summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/led_wolf.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/common/led_wolf.c b/common/led_wolf.c
index 0df2493edc..3223bfb74c 100644
--- a/common/led_wolf.c
+++ b/common/led_wolf.c
@@ -55,8 +55,11 @@ static void led_tick(void)
bat_led_set_color(LED_OFF);
break;
case PWR_STATE_DISCHARGE:
- if (chipset_in_state(CHIPSET_STATE_ON))
- bat_led_set_color(LED_AMBER);
+ if (chipset_in_state(CHIPSET_STATE_ON) ||
+ chipset_in_state(CHIPSET_STATE_SUSPEND))
+ bat_led_set_color(
+ (charge_get_percent() < BATTERY_LEVEL_LOW) ?
+ LED_AMBER : LED_OFF);
else
bat_led_set_color(LED_OFF);
break;