You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rgbmatrix: Avoid leaving an incompletely configured display bus
I did not reproduce the exact problem reported; however, I reproduced
that a failure to construct an RGBMatrix object would leave CircuitPython
in an inconsistent state with a display bus registered but not working:
```py
>>> import rgbmatrix, board; rgbmatrix.RGBMatrix(width=64, bit_depth=1, rgb_pins=[], addr_pins=[], clock_pin=board.A0, latch_pin=board.A1, output_enable_pin=board.A2)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: The length of rgb_pins must be 6, 12, 18, 24, or 30
>>> import rgbmatrix, board; rgbmatrix.RGBMatrix(width=64, bit_depth=1, rgb_pins=[], addr_pins=[], clock_pin=board.A0, latch_pin=board.A1, output_enable_pin=board.A2)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
RuntimeError: Too many display busses; forgot displayio.release_displays() ?
```
After the fix the second call also results in a ValueError, not a
RuntimeError, which is correct.
Closes#9674
0 commit comments