diff options
Diffstat (limited to 'board/marzipan')
-rw-r--r-- | board/marzipan/led.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/board/marzipan/led.c b/board/marzipan/led.c index 996d06cdd5..4475718a87 100644 --- a/board/marzipan/led.c +++ b/board/marzipan/led.c @@ -66,7 +66,6 @@ static void board_led_set_battery(void) static int battery_ticks; int color = LED_OFF; int period = 0; - uint32_t chflags = charge_get_flags(); battery_ticks++; @@ -106,16 +105,16 @@ static void board_led_set_battery(void) color = LED_BLUE; break; case PWR_STATE_IDLE: /* External power connected in IDLE */ - if (chflags & CHARGE_FLAG_FORCE_IDLE) { - /* Factory mode: Blue 2 sec, Amber 2 sec */ - period = (2 + 2) * LED_ONE_SEC; - battery_ticks = battery_ticks % period; - if (battery_ticks < 2 * LED_ONE_SEC) - color = LED_BLUE; - else - color = LED_AMBER; - } else + color = LED_BLUE; + break; + case PWR_STATE_FORCED_IDLE: + /* Factory mode: Blue 2 sec, Amber 2 sec */ + period = (2 + 2) * LED_ONE_SEC; + battery_ticks = battery_ticks % period; + if (battery_ticks < 2 * LED_ONE_SEC) color = LED_BLUE; + else + color = LED_AMBER; break; default: /* Other states don't alter LED behavior */ |