1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-24 16:55:20 +03:00

KTS to KMH conversion was going over int16_t limits

This commit is contained in:
bsongis 2012-05-06 10:33:03 +00:00
parent 71daab636d
commit 2c8c1f856b

View file

@ -693,7 +693,7 @@ void putsTelemetryValue(uint8_t x, uint8_t y, int16_t val, uint8_t unit, uint8_t
#else
if (unit == UNIT_KTS) {
// kts to km/h
val = (val * 463) / 250;
val = (val * 46) / 25;
}
#endif
lcd_outdezAtt(x, (att & DBLSIZE ? y - FH : y), val, att & (~NO_UNIT)); // TODO we could add this test inside lcd_outdezAtt!