aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2014-12-15 12:01:08 +0100
committerLars-Dominik Braun <lars@6xq.net>2014-12-15 12:01:08 +0100
commitc641aede0abe6a51b3cea362cca4e71e0f1623bf (patch)
tree1ee521ab0a657324fc21093010aa9318aba59d70
parent7050b05cb88939f5a5e0d2689a925f107109f454 (diff)
downloadhourglass-c641aede0abe6a51b3cea362cca4e71e0f1623bf.tar.gz
hourglass-c641aede0abe6a51b3cea362cca4e71e0f1623bf.tar.bz2
hourglass-c641aede0abe6a51b3cea362cca4e71e0f1623bf.zip
ui: Switch off LEDs when going into select_coarse
We’re starting with a value of 0.
-rw-r--r--ui.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ui.c b/ui.c
index 297d9e6..392f383 100644
--- a/ui.c
+++ b/ui.c
@@ -219,8 +219,12 @@ static void doIdle () {
gyroStart ();
mode = UIMODE_SELECT_COARSE;
puts ("idle->select");
- speakerStart (SPEAKER_BEEP);
+ /* start with a value of zero */
+ for (uint8_t i = 0; i < PWM_LED_COUNT; i++) {
+ pwmSet (i, PWM_OFF);
+ }
coarseValue = 0;
+ speakerStart (SPEAKER_BEEP);
return;
}
}