diff options
Diffstat (limited to 'board/kingoftown/led.c')
-rw-r--r-- | board/kingoftown/led.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/board/kingoftown/led.c b/board/kingoftown/led.c index 412c14ef2f..ded9586f52 100644 --- a/board/kingoftown/led.c +++ b/board/kingoftown/led.c @@ -97,7 +97,6 @@ static void board_led_set_battery(void) static int battery_ticks; static int power_ticks; int led_blink_cycle; - uint32_t chflags = charge_get_flags(); battery_ticks++; @@ -165,15 +164,13 @@ static void board_led_set_battery(void) set_active_port_color(LED_WHITE); break; case PWR_STATE_IDLE: /* External power connected in IDLE */ - if (chflags & CHARGE_FLAG_FORCE_IDLE) { - led_blink_cycle = - battery_ticks % (2 * TIMES_TICK_ONE_SEC); - set_active_port_color( - (led_blink_cycle < TIMES_TICK_ONE_SEC) ? - LED_AMBER : - LED_OFF); - } else - set_active_port_color(LED_WHITE); + set_active_port_color(LED_WHITE); + break; + case PWR_STATE_FORCED_IDLE: + led_blink_cycle = battery_ticks % (2 * TIMES_TICK_ONE_SEC); + set_active_port_color((led_blink_cycle < TIMES_TICK_ONE_SEC) ? + LED_AMBER : + LED_OFF); break; default: /* Other states don't alter LED behavior */ |