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
I accidentally tried to use set_matrix_pixel on a negative pixel value, which crashes the program in the following way:
"spherov2\controls\v2.py", line 157, in new_packet
packet = Packet(flags, did, cid, self.__seq, tid, sid, bytearray(data or []))
^^^^^^^^^^^^^^^^^^^^^
ValueError: byte must be in range(0, 256)
While it makes sense that calling set_matrix_pixel on a negative pixel location wouldn't work, it should ideally be handled gracefully and at the very least return a specific error rather than crashing the program.
The text was updated successfully, but these errors were encountered:
That's fine, but having a specific exception that lets you know that the issue was that the pixel coordinate was not valid (outside of the 0-7 range) rather than getting an error from an internal function with an amiguous relationship to set_matrix_pixel would be more understandable.
I accidentally tried to use set_matrix_pixel on a negative pixel value, which crashes the program in the following way:
While it makes sense that calling set_matrix_pixel on a negative pixel location wouldn't work, it should ideally be handled gracefully and at the very least return a specific error rather than crashing the program.
The text was updated successfully, but these errors were encountered: