diff options
Diffstat (limited to 'board/dratini')
-rw-r--r-- | board/dratini/led.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/board/dratini/led.c b/board/dratini/led.c index ab29ac0344..f85ea1f343 100644 --- a/board/dratini/led.c +++ b/board/dratini/led.c @@ -145,7 +145,6 @@ static void led_set_battery(void) { static int battery_ticks; static int power_ticks; - uint32_t chflags = charge_get_flags(); battery_ticks++; @@ -199,14 +198,13 @@ static void 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) - set_active_port_color( - (battery_ticks % LED_TICKS_PER_CYCLE < - LED_ON_TICKS) ? - LED_AMBER : - LED_OFF); - else - set_active_port_color(LED_WHITE); + set_active_port_color(LED_WHITE); + break; + case PWR_STATE_FORCED_IDLE: + set_active_port_color( + (battery_ticks % LED_TICKS_PER_CYCLE < LED_ON_TICKS) ? + LED_AMBER : + LED_OFF); break; default: /* Other states don't alter LED behavior */ |