FastLED-Patterns icon indicating copy to clipboard operation
FastLED-Patterns copied to clipboard

num of LEDs needs to be modulo 3

Open antonmeyer opened this issue 10 years ago • 0 comments

there is a bug in: for (int q=0; q < 3; q++) { for (int i=0; i < NUM_LEDS; i=i+3) { int pos = i+q; leds[pos] = c; if NUM_LEDS is 50 you end up in 48 + 2 = 50 for i = 48 q = 2 which writes to an position outside the array or cause an exception you better check for (i+q) < NUM_LEDS

this limitation / bug is inherried from examples

antonmeyer avatar Apr 10 '15 19:04 antonmeyer