mirror of
https://github.com/opentx/opentx.git
synced 2025-07-26 17:55:19 +03:00
KTS to KMH conversion was going over int16_t limits
This commit is contained in:
parent
71daab636d
commit
2c8c1f856b
1 changed files with 1 additions and 1 deletions
|
@ -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!
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue