Merge pull request #8153 from opentx/3djc/tx12-charge

Handles charge indication on TX12
This commit is contained in:
Bertrand Songis
2020-12-18 18:27:47 +01:00
committed by GitHub
6 changed files with 70 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