mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-30 02:20:48 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user