1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-25 01:05:10 +03:00

Fluid units

This commit is contained in:
Andre Bernet 2015-03-25 11:49:25 +04:00
parent 47274050ed
commit e6b0a01165
10 changed files with 18 additions and 7 deletions

View file

@ -565,7 +565,12 @@ int32_t convertTelemetryValue(int32_t value, uint8_t unit, uint8_t prec, uint8_t
value = 32 + (value*18)/10;
}
}
else if (unit == UNIT_MILLILITERS) {
if (destUnit == UNIT_FLOZ) {
value = (value * 100) / 2957;
}
}
for (int i=destPrec; i<prec; i++)
value /= 10;