diff options
author | Alec Berg <alecaberg@chromium.org> | 2015-09-24 15:56:41 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2015-09-25 09:13:34 -0700 |
commit | f53c8fd9fa8ecfc695c32d687130504659d7d304 (patch) | |
tree | 3e19044cf304c451c6b30ecbcaaeb9e5033e23a1 /common | |
parent | e5ec074dfafd75bb8df093e920d5bc47eff2b108 (diff) | |
download | chrome-ec-f53c8fd9fa8ecfc695c32d687130504659d7d304.tar.gz |
lightbar: clear all segments before starting tap for battery
This makes sure to clear all segments before turning on lightbar
for tap for battery. Without this, the previous colors are stored
and flash briefly before starting the tap for battery pattern.
BUG=chrome-os-partner:45835
BRANCH=smaug
TEST=tested on ryu. go to s5, type 'lightbar seq tap' and see that
the tap sequence starts without first blinking google colors.
note that this doesn't affect samus because for samus in s5, the
lightbar is not powered, so when we do tap for battery, we first
power the lightbar and the registers are cleared.
Change-Id: Ic7ae8c580005e786ba35656d8feeedac56e35cfd
Signed-off-by: Alec Berg <alecaberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/302147
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
(cherry picked from commit 962d0b2595b1dbb5ef162b7e6b4db7ce8a65e6c5)
Reviewed-on: https://chromium-review.googlesource.com/302447
Diffstat (limited to 'common')
-rw-r--r-- | common/lightbar.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/common/lightbar.c b/common/lightbar.c index e0f5afccac..6298b9845f 100644 --- a/common/lightbar.c +++ b/common/lightbar.c @@ -1064,6 +1064,9 @@ static uint32_t sequence_TAP(void) lb_set_rgb(NUM_LEDS, 0, 0, 0); } #endif + /* First clear all segments */ + lb_set_rgb(NUM_LEDS, 0, 0, 0); + lb_on(); for (i = 0; i < NUM_LEDS; i++) |