mirror of
https://github.com/opentx/opentx.git
synced 2025-07-25 17:25:13 +03:00
Fixes #1422
This commit is contained in:
parent
36e78b9315
commit
81ed325830
1 changed files with 5 additions and 1 deletions
|
@ -898,14 +898,18 @@ FORCEINLINE void convertUnit(getvalue_t & val, uint8_t & unit)
|
|||
if (unit == UNIT_KTS) {
|
||||
// kts to mph
|
||||
unit = UNIT_SPEED;
|
||||
val = (val * 31) / 27;
|
||||
val = (val * 23) / 20;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (unit == UNIT_KTS) {
|
||||
// kts to km/h
|
||||
unit = UNIT_SPEED;
|
||||
#if defined(CPUARM)
|
||||
val = (val * 1852) / 1000;
|
||||
#else
|
||||
val = (val * 50) / 27;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue