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:33:51 +0100
commit270db9526c63b3194df250bdb324ee4185bb4b65 (patch)
tree4ca1dbb97f88e838df41d7a4b6b6daffcb47580b
parent8e167e3d69ba209e0051e564463c03ecee330f70 (diff)
downloadStripClock-master.tar.gz
StripClock-master.tar.bz2
at 12/24 no hour led was shownHEADmaster
-rw-r--r--StripClock.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/StripClock.c b/StripClock.c
index 94857d8..9e23d87 100644
--- a/StripClock.c
+++ b/StripClock.c
@@ -253,9 +253,11 @@ uint8_t updateStrip(void)
const uint8_t cur_hour_g = 5;
const uint8_t cur_hour_b = 16;
- 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++) {