aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2014-09-30 16:50:10 +0200
committerLars-Dominik Braun <lars@6xq.net>2014-09-30 16:50:10 +0200
commitd03e3d0faebb9e643efc7696ceb385b23a4881bf (patch)
treea32ae6e13caea46b29317041992c187b6974378c
parent7d78e567cae3b8d3eaa11bf00ec45d18244e4645 (diff)
downloadhourglass-d03e3d0faebb9e643efc7696ceb385b23a4881bf.tar.gz
hourglass-d03e3d0faebb9e643efc7696ceb385b23a4881bf.tar.bz2
hourglass-d03e3d0faebb9e643efc7696ceb385b23a4881bf.zip
Fix theoretical LED step edge case
-rw-r--r--ui.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui.c b/ui.c
index ce98b32..aaf3c5b 100644
--- a/ui.c
+++ b/ui.c
@@ -210,7 +210,7 @@ static void doRun () {
speakerStart (SPEAKER_BEEP);
timerStop ();
timerStart (ALARM_TIME);
- } else {
+ } else if (currLed > 0) {
/* one step */
--brightness[currLed];
pwmSet (horizonLed (currLed), brightness[currLed]);