summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorBill Richardson <wfrichar@chromium.org>2012-10-10 14:53:17 -0700
committerGerrit <chrome-bot@google.com>2012-10-10 15:59:01 -0700
commitf874e2a1cab4921e16387f8c53e673d2949cbec0 (patch)
tree4c311c82a1d778d3cc37f312b1905dc5e2ac9c60 /common
parent160b343e7c75a939d64ef92146c78db97498c9d6 (diff)
downloadchrome-ec-f874e2a1cab4921e16387f8c53e673d2949cbec0.tar.gz
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 <wfrichar@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/35190 Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'common')
-rw-r--r--common/lightbar.c22
1 files changed, 11 insertions, 11 deletions
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;
}