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
+6 -1
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;