summaryrefslogtreecommitdiff
path: root/board/redrix/led.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/redrix/led.c')
-rw-r--r--board/redrix/led.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/board/redrix/led.c b/board/redrix/led.c
index c794bc8b5f..ca98daaf63 100644
--- a/board/redrix/led.c
+++ b/board/redrix/led.c
@@ -174,17 +174,23 @@ static void led_set_battery(void)
if (charge_get_percent() < 10)
led_set_color_battery(RIGHT_PORT,
(battery_ticks % LED_TICKS_PER_CYCLE
- < LED_ON_TICKS) ? LED_WHITE : LED_OFF);
+ < LED_ON_TICKS) ? LED_AMBER : LED_OFF);
else
led_set_color_battery(RIGHT_PORT, LED_OFF);
}
- if (led_auto_control_is_enabled(EC_LED_ID_LEFT_LED))
- led_set_color_battery(LEFT_PORT, LED_OFF);
+ if (led_auto_control_is_enabled(EC_LED_ID_LEFT_LED)) {
+ if (charge_get_percent() < 10)
+ led_set_color_battery(LEFT_PORT,
+ (battery_ticks % LED_TICKS_PER_CYCLE
+ < LED_ON_TICKS) ? LED_AMBER : LED_OFF);
+ else
+ led_set_color_battery(LEFT_PORT, LED_OFF);
+ }
break;
case PWR_STATE_ERROR:
set_active_port_color((battery_ticks & 0x1) ?
- LED_WHITE : LED_OFF);
+ LED_AMBER : LED_OFF);
break;
case PWR_STATE_CHARGE_NEAR_FULL:
set_active_port_color(LED_WHITE);