From 45638dc989197870396a316dda31ac5cd7334d82 Mon Sep 17 00:00:00 2001 From: Tobias Blum Date: Sun, 5 Jan 2020 17:17:52 +0100 Subject: [PATCH] Fix segment LED numbering --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 76ab536..76366d8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -217,7 +217,7 @@ void setAnimation(uint8_t segment, uint8_t mode = FX_MODE_STATIC, uint32_t color // Support only one segment for the moment if (segment == 0) { startLed = 0; - endLed = atoi(paramNumLedsValue) - 1; + endLed = atoi(paramNumLedsValue); } Serial.printf("setAnimation: %d, %d-%d, Mode: %d, Color: %d, Speed: %d\n", segment, startLed, endLed, mode, color, speed); ws2812fx.setSegment(segment, startLed, endLed, mode, color, speed, reverse);