The following code re-defines the leds 2d array, yet does not throw any errors, and does not let the program recover by switching to another pattern.
leds[0] = 0
This is because we have redefined this led[0] array. I suspect it will also not work if we do leds = null or something.
A possible fix for this is either re-instantiating the leds every time we load a new pattern, or check every update if every element of the 2d array is still in tact.
The following code re-defines the leds 2d array, yet does not throw any errors, and does not let the program recover by switching to another pattern.
leds[0] = 0This is because we have redefined this
led[0]array. I suspect it will also not work if we doleds = nullor something.A possible fix for this is either re-instantiating the leds every time we load a new pattern, or check every update if every element of the 2d array is still in tact.