redrix: Blinking with each side LED while battery error.
This patch fixes the battery error LED should be blinking on each side.
BRANCH=none
TEST=Verify LED blink quickly while battery error on each side.
@@ -189,8 +189,15 @@ static void led_set_battery(void)
}
break;
case PWR_STATE_ERROR:
- set_active_port_color((battery_ticks & 0x1) ?
- LED_AMBER : LED_OFF);
+ if (led_auto_control_is_enabled(EC_LED_ID_RIGHT_LED)) {
+ led_set_color_battery(RIGHT_PORT, (battery_ticks & 0x1)
+ ? LED_AMBER : LED_OFF);
+ }
+
+ if (led_auto_control_is_enabled(EC_LED_ID_LEFT_LED)) {
+ led_set_color_battery(LEFT_PORT, (battery_ticks & 0x1)
+ ? LED_AMBER : LED_OFF);
+ }
break;
case PWR_STATE_CHARGE_NEAR_FULL:
set_active_port_color(LED_WHITE);
