spring: Prevent showing green LED when we are actually charging

When we use about the same amount of power as what the charger provides,
we sometimes show green LED. We should avoid this when the battery is
not full.

BUG=chrome-os-partner:19746
TEST=Manual
BRANCH=spring

Change-Id: Id31762aefe22535de64f63a023c35995a3725ef8
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/56724
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
This commit is contained in:
Vic Yang
2013-05-27 17:09:05 +08:00
committed by ChromeBot
parent 87d8f8e5b1
commit 3501ccffdb

View File

@@ -260,7 +260,8 @@ static void battery_led_update(void)
break;
}
if (current && desired_current)
/* If battery doesn't want any current, it's considered full. */
if (desired_current)
state = LED_STATE_SOLID_YELLOW;
else
state = LED_STATE_SOLID_GREEN;