-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Hello,
First of all, great project !
I noticed the Rainbow Chase array would almost instantly freeze on my 70 LED strip on an RPI Pico W.
The error in the console is :
Traceback (most recent call last):
File "uPixels.py", line 90, in execute
File "uPixels.py", line 249, in rainbowChase
File "neopixel.py", line 1, in __setitem__
IndexError: bytearray index out of range
Turns out on line 249 and 253 of uPixels.py, the self.np[i + q] instruction indexes the array out of bounds because :
for i in range(0, self.np.n , 3)will generate 69 as the max valuefor q in range(3)will generate 0, 1 and 2- therefore
self.np[i + q]can reach 70, 71, both out of bounds
The best solution I found was to add -2 to lines 247 and 252, like so :
for i in range(0, self.np.n - 2, 3):
And then everything works !
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working