summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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++) {