Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 1561 → Rev 1562

/trunk/fc.c
1419,7 → 1419,9
if(HoehenWert > SollHoehe || !(EE_Parameter.ExtraConfig & CFG2_HEIGHT_LIMIT))
{
// ------------------------- P-Part ----------------------------
HeightDeviation = (int)(HoehenWert - SollHoehe); // positive when too high
tmp_long = (HoehenWert - SollHoehe); // positive when too high
LIMIT_MIN_MAX(tmp_long, -32000, 32000); // avoid overflov when casting to int
HeightDeviation = (int)(tmp_long); // positive when too high
tmp_int = (HeightDeviation * (int)Parameter_Hoehe_P) / 16; // p-part
HCGas -= tmp_int;
// ------------------------- D-Part 1: Vario Meter ----------------------------