summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Baumann <derflob@derflob.de>2015-04-22 09:32:54 +0200
committerFlorian Baumann <derflob@derflob.de>2015-04-22 09:32:54 +0200
commita146685583906177ed2a67fc1008a12c88764917 (patch)
treed009aa2363ea3044578d9793ccadc9f1578ecd12
parent72281458b6fd0f2e9ef8c21f7132f331bd2d7d38 (diff)
downloadStripClock-a146685583906177ed2a67fc1008a12c88764917.tar.gz
StripClock-a146685583906177ed2a67fc1008a12c88764917.tar.bz2
no minute led, when minute == 0
-rw-r--r--StripClock.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/StripClock.c b/StripClock.c
index 7ff200c..cfb4448 100644
--- a/StripClock.c
+++ b/StripClock.c
@@ -256,10 +256,10 @@ uint8_t updateStrip(void)
for (uint8_t i = 0; i < LEDS; i++) {
uint8_t r, g, b = 0;
-
if (i < dt.minute - 1) {
//past minute
if (i % 5 == 4) {
+ //hour leds
r = past_min_r * 5;
g = past_min_g * 5;
b = past_min_b * 5;
@@ -268,13 +268,13 @@ uint8_t updateStrip(void)
g = past_min_g;
b = past_min_b;
}
- } else if (i == dt.minute - 1 || (i == 59 && dt.minute == 0)) {
+ } else if (i == dt.minute - 1) {
//running minute
r = cur_min_r;
g = cur_min_g;
b = cur_min_b;
} else if (i % 5 == 4) {
- //future hour leds
+ //hour leds
r = past_min_r;
g = past_min_g;
b = past_min_b;