diff options
Diffstat (limited to 'board/drawcia/led.c')
-rw-r--r-- | board/drawcia/led.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/board/drawcia/led.c b/board/drawcia/led.c index 3d743265f4..48dc7fd1d9 100644 --- a/board/drawcia/led.c +++ b/board/drawcia/led.c @@ -114,7 +114,6 @@ static void led_set_battery(void) { static int battery_ticks; static int power_ticks; - uint32_t chflags = charge_get_flags(); battery_ticks++; @@ -163,11 +162,11 @@ static void led_set_battery(void) led_set_color_battery(LED_WHITE); break; case PWR_STATE_IDLE: /* External power connected in IDLE */ - if (chflags & CHARGE_FLAG_FORCE_IDLE) - led_set_color_battery( - (battery_ticks & 0x2) ? LED_AMBER : LED_OFF); - else - led_set_color_battery(LED_WHITE); + led_set_color_battery(LED_WHITE); + break; + case PWR_STATE_FORCED_IDLE: + led_set_color_battery((battery_ticks & 0x2) ? LED_AMBER : + LED_OFF); break; default: /* Other states don't alter LED behavior */ |