summaryrefslogtreecommitdiff
path: root/board/coachz/led.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/coachz/led.c')
-rw-r--r--board/coachz/led.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/board/coachz/led.c b/board/coachz/led.c
index 1562e69a15..35d55bea84 100644
--- a/board/coachz/led.c
+++ b/board/coachz/led.c
@@ -69,7 +69,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++;
@@ -137,16 +136,16 @@ static void board_led_set_battery(void)
}
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 */