1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-18 13:55:18 +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

@ -473,7 +473,7 @@ void showBatteryPage(void)
i2c_OLED_set_line(rowIndex++);
i2c_OLED_send_string(lineBuffer);
uint8_t capacityPercentage = calculateBatteryCapacityRemainingPercentage();
uint8_t capacityPercentage = calculateBatteryPercentage();
i2c_OLED_set_line(rowIndex++);
drawHorizonalPercentageBar(SCREEN_CHARACTER_COLUMN_COUNT, capacityPercentage);
}