summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Richardson <wfrichar@chromium.org>2013-08-27 09:11:11 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2013-08-28 16:46:37 +0000
commit266807f28942daaf9425ca0e77301842168450da (patch)
tree42687723e04061c04ab317f2e6f1406960c5d99d
parent7e49fb5ef485a78365cabcf8c40b9a358ea8360a (diff)
downloadchrome-ec-266807f28942daaf9425ca0e77301842168450da.tar.gz
Falco: LED should flash white when battery is < 12%, not 7%.
BUG=chrome-os-partner:22159 BRANCH=Falco, ToT TEST=manual Let the battery run down. Below 12%, the LED should blink white. Original-Change-Id: I3be2da69a113134456420b1a305e4a0c159c0022 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/167080 (cherry picked from commit fdd33356a31c616457d546d2a1435282e9744355) Change-Id: I7d27ebaea2123b88ea963bf430a5da122a5071b6 Reviewed-on: https://chromium-review.googlesource.com/167139 Commit-Queue: Bill Richardson <wfrichar@chromium.org> Tested-by: Bill Richardson <wfrichar@chromium.org> Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
-rw-r--r--common/led_falco.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/common/led_falco.c b/common/led_falco.c
index 0adfc255a3..c0d7c5f3ef 100644
--- a/common/led_falco.c
+++ b/common/led_falco.c
@@ -79,7 +79,12 @@ static void led_tick(void)
bat_led_set_color(LED_AMBER);
break;
case PWR_STATE_DISCHARGE:
- if (charge_get_percent() <= BATTERY_LEVEL_LOW)
+ /* See crosbug.com/p/22159. There's a 3% difference
+ * between the battery level seen by the kernel and what's
+ * really going on, so if they want to see 12%, we use 15%.
+ * Hard code this number here, because this only affects the
+ * LED color, not the battery charge state. */
+ if (charge_get_percent() < 15)
bat_led_set_color((ticks & 0x4) ? LED_WHITE : LED_OFF);
break;
case PWR_STATE_ERROR: