From f874e2a1cab4921e16387f8c53e673d2949cbec0 Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Wed, 10 Oct 2012 14:53:17 -0700 Subject: Fix lightbar test pattern An earlier commit made the lightbar test sequence run much too quickly. This puts it back. I'm not sure if the factory still looks at this, but I think they did at one time, so we might as well keep it working. It's helpful for debugging anyway. BUG=chrome-os-partner:8039 BRANCH=link TEST=manual Log in, run "ectool lightbar seq test". You should see the lightbar colors pulse in various colors, then go back to whatever they were doing before. Change-Id: I11c24a448bf40f0c0c82456fcf6e0415a0392c28 Signed-off-by: Bill Richardson Reviewed-on: https://gerrit.chromium.org/gerrit/35190 Reviewed-by: Randall Spangler --- common/lightbar.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'common') diff --git a/common/lightbar.c b/common/lightbar.c index 0f448c4cba..c99a444c84 100644 --- a/common/lightbar.c +++ b/common/lightbar.c @@ -365,7 +365,7 @@ static const struct rgb_s colors[] = { {0x00, 0x00, 0xff}, {0x00, 0xff, 0xff}, {0xff, 0x00, 0xff}, - {0x00, 0x00, 0x00}, + {0xff, 0xff, 0xff}, }; /* Map battery_level to one of the google colors */ @@ -563,7 +563,7 @@ static uint32_t sequence_S0(void) /* Continue ramping in if needed */ if (st.ramp < 0xff) - st.ramp++ ; + st.ramp++; } return 0; } @@ -676,18 +676,18 @@ static uint32_t sequence_TEST_inner(void) g = colors[i].g ? k : 0; b = colors[i].b ? k : 0; lightbar_setrgb(NUM_LEDS, r, g, b); + WAIT_OR_RET(10000); + } + for (k = kmax; k >= 0; k -= kstep) { + r = colors[i].r ? k : 0; + g = colors[i].g ? k : 0; + b = colors[i].b ? k : 0; + lightbar_setrgb(NUM_LEDS, r, g, b); + WAIT_OR_RET(10000); } - WAIT_OR_RET(10000); - } - for (k = kmax; k >= 0; k -= kstep) { - r = colors[i].r ? k : 0; - g = colors[i].g ? k : 0; - b = colors[i].b ? k : 0; - lightbar_setrgb(NUM_LEDS, r, g, b); - WAIT_OR_RET(10000); } - lightbar_setrgb(NUM_LEDS, r, g, b); + lightbar_setrgb(NUM_LEDS, 0, 0, 0); return 0; } -- cgit v1.2.1