KTS to KMH conversion was going over int16_t limits
This commit is contained in:
+1
-1
@@ -693,7 +693,7 @@ void putsTelemetryValue(uint8_t x, uint8_t y, int16_t val, uint8_t unit, uint8_t
|
|||||||
#else
|
#else
|
||||||
if (unit == UNIT_KTS) {
|
if (unit == UNIT_KTS) {
|
||||||
// kts to km/h
|
// kts to km/h
|
||||||
val = (val * 463) / 250;
|
val = (val * 46) / 25;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
lcd_outdezAtt(x, (att & DBLSIZE ? y - FH : y), val, att & (~NO_UNIT)); // TODO we could add this test inside lcd_outdezAtt!
|
lcd_outdezAtt(x, (att & DBLSIZE ? y - FH : y), val, att & (~NO_UNIT)); // TODO we could add this test inside lcd_outdezAtt!
|
||||||
|
|||||||
Reference in New Issue
Block a user