Rev 1521 | Rev 1586 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1521 | Rev 1562 | ||
---|---|---|---|
Line 1417... | Line 1417... | ||
1417 | } |
1417 | } |
Line 1418... | Line 1418... | ||
1418 | 1418 | ||
1419 | if(HoehenWert > SollHoehe || !(EE_Parameter.ExtraConfig & CFG2_HEIGHT_LIMIT)) |
1419 | if(HoehenWert > SollHoehe || !(EE_Parameter.ExtraConfig & CFG2_HEIGHT_LIMIT)) |
1420 | { |
1420 | { |
1421 | // ------------------------- P-Part ---------------------------- |
1421 | // ------------------------- P-Part ---------------------------- |
- | 1422 | tmp_long = (HoehenWert - SollHoehe); // positive when too high |
|
- | 1423 | LIMIT_MIN_MAX(tmp_long, -32000, 32000); // avoid overflov when casting to int |
|
1422 | HeightDeviation = (int)(HoehenWert - SollHoehe); // positive when too high |
1424 | HeightDeviation = (int)(tmp_long); // positive when too high |
1423 | tmp_int = (HeightDeviation * (int)Parameter_Hoehe_P) / 16; // p-part |
1425 | tmp_int = (HeightDeviation * (int)Parameter_Hoehe_P) / 16; // p-part |
1424 | HCGas -= tmp_int; |
1426 | HCGas -= tmp_int; |
1425 | // ------------------------- D-Part 1: Vario Meter ---------------------------- |
1427 | // ------------------------- D-Part 1: Vario Meter ---------------------------- |
1426 | tmp_int = VarioMeter / 8; |
1428 | tmp_int = VarioMeter / 8; |