diff --git a/include/LedManager.h b/include/LedManager.h index 95c9d95..bfbd418 100644 --- a/include/LedManager.h +++ b/include/LedManager.h @@ -9,6 +9,7 @@ #define HOUR_PIN 17 #define NUM_PIXELS 28 #define SECOND_NUM_PIXELS 2 +#define NUM_LEDS 2 class LedManager { public: diff --git a/src/LedManager.cpp b/src/LedManager.cpp index dfcbcc6..c3ffe25 100644 --- a/src/LedManager.cpp +++ b/src/LedManager.cpp @@ -63,11 +63,13 @@ void LedManager::updateColorsFromPreferences() { void LedManager::showHourDigit(int number, int startPixel, uint32_t color) { for (int i = 0; i < 7; i++) { if (hourSegments[number][i]) { - hoursStrip.setPixelColor(startPixel + (i * 2), color); - hoursStrip.setPixelColor(startPixel + (i * 2) + 1, color); + for(int j = 0; j < NUM_LEDS; j++){ + hoursStrip.setPixelColor(startPixel + (i * NUM_LEDS) + j, color); + } } else { - hoursStrip.setPixelColor(startPixel + (i * 2), hoursStrip.Color(0, 0, 0)); - hoursStrip.setPixelColor(startPixel + (i * 2) + 1, hoursStrip.Color(0, 0, 0)); + for(int j = 0; j < NUM_LEDS; j++){ + hoursStrip.setPixelColor(startPixel + (i * NUM_LEDS) + j, hoursStrip.Color(0, 0, 0)); + } } } }