summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Baumann <derflob@derflob.de>2016-02-05 21:30:41 +0100
committerFlorian Baumann <derflob@derflob.de>2016-02-05 21:30:41 +0100
commit4e43996bd8b75e8b4f5e8ab50b705cd3e2752fb8 (patch)
tree908f99f170ba9bd9107d01c9aa9d37017ad70e02
parentbb7bc0d0151868a3ed979982e6a79c16b89d4c34 (diff)
downloadStripClock-christmas.tar.gz
StripClock-christmas.tar.bz2
at 12/24 no hour led was shownchristmas
-rw-r--r--StripClock.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/StripClock.c b/StripClock.c
index 29bdbcf..e6ba451 100644
--- a/StripClock.c
+++ b/StripClock.c
@@ -237,9 +237,11 @@ uint8_t updateStrip(void)
return 0;
}
- uint8_t hour_led = ((dt.hour % 12) * (LEDS / 12)) - 1;
- if (hour_led == -1)
+ uint8_t hour_led = ((dt.hour % 12) * (LEDS / 12));
+ if (hour_led == 0)
hour_led = 59;
+ else
+ hour_led--;
for (uint8_t i = 0; i < LEDS; i++) {
int16_t r, g, b = 0;