1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 16:25:31 +03:00

Unified 'calculateBatteryPercentage' and 'calculateBatteryCapacityRemainingPercentage'.

Fixed tests.

Changed consumption calculations to be based on latest amperage value.
This commit is contained in:
mikeller 2016-11-27 20:24:50 +13:00 committed by Michael Keller
parent e068d644ea
commit e782ca55e6
7 changed files with 44 additions and 39 deletions

View file

@ -480,7 +480,7 @@ static void applyLedFixedLayers()
case LED_FUNCTION_BATTERY:
color = HSV(RED);
hOffset += scaleRange(calculateBatteryCapacityRemainingPercentage(), 0, 100, -30, 120);
hOffset += scaleRange(calculateBatteryPercentage(), 0, 100, -30, 120);
break;
case LED_FUNCTION_RSSI: