Handles charge indication

This commit is contained in:
3djc
2020-12-10 13:08:59 +01:00
parent 19b4c687ee
commit 45c24c6b28
6 changed files with 61 additions and 3 deletions
+6 -1
View File
@@ -183,8 +183,13 @@ void displayBattVoltage()
lcdDrawSolidFilledRect(VBATT_X - 25, VBATT_Y + 9, 21, 5);
lcdDrawSolidVerticalLine(VBATT_X - 4, VBATT_Y + 10, 3);
uint8_t count = GET_TXBATT_BARS(20);
for (uint8_t i = 0; i < count; i += 2)
for (uint8_t i = 0; i < count; i += 2) {
#if defined(USB_CHARGER)
if ((i >= count - 2) && usbChargerLed() && BLINK_ON_PHASE) // Blink last segment on charge
continue;
#endif
lcdDrawSolidVerticalLine(VBATT_X - 24 + i, VBATT_Y + 10, 3);
}
if (!IS_TXBATT_WARNING() || BLINK_ON_PHASE)
lcdDrawSolidFilledRect(VBATT_X - 26, VBATT_Y, 24, 15);
#else