From f53c8fd9fa8ecfc695c32d687130504659d7d304 Mon Sep 17 00:00:00 2001 From: Alec Berg Date: Thu, 24 Sep 2015 15:56:41 -0700 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/302147 Reviewed-by: Vincent Palatin Commit-Queue: Vincent Palatin (cherry picked from commit 962d0b2595b1dbb5ef162b7e6b4db7ce8a65e6c5) Reviewed-on: https://chromium-review.googlesource.com/302447 --- common/lightbar.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'common/lightbar.c') 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++) -- cgit v1.2.1