From f0509de411677fdfb21a5df06b14518c50767279 Mon Sep 17 00:00:00 2001 From: Fabian Schlenz Date: Sun, 16 Jun 2019 12:43:34 +0200 Subject: [PATCH] PixelClockEffect is now being displayed correctly. --- src/effect_pixelclock.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/effect_pixelclock.cpp b/src/effect_pixelclock.cpp index f5c3115..f7fb05e 100644 --- a/src/effect_pixelclock.cpp +++ b/src/effect_pixelclock.cpp @@ -2,7 +2,7 @@ #include "ntp.h" PixelClockEffect::PixelClockEffect() { - window = new Window(0, 0, LED_WIDTH, LED_HEIGHT-7); + window = new Window(0, 0, LED_WIDTH, LED_HEIGHT-6); } void PixelClockEffect::start() { @@ -23,14 +23,14 @@ void PixelClockEffect::loop() { for (uint8_t s=0; s<60; s++) { x = window->width - 1 - s/10; y = window->height - 1 - (s % 10); - if (s<=seconds) window->setPixel(x, y, _color_seconds); + if (ssetPixel(x, y, _color_seconds); } - + uint8_t minutes = ntpClient.getMinutes(); for (uint8_t m=0; m<60; m++) { x = 6 - m/10; y = window->height - 1 - (m % 10); - if (m<=minutes) window->setPixel(x, y, _color_seconds); + if (msetPixel(x, y, _color_minutes); } }