Hi @all, @benedictdied,
We found a bug when setting a special pattern (outer ring) with the LED Matrix. Using the setAll() method works fine to set all LEDs on and off, but send_LEDMatrix_array() fails and returns a “communication interrupted” error.
This happens only when using a Windows laptop: testing with a Linux computer and with the Web Serial Tester works fine. I verified that both computers have the same repository and I have in both computers the latest pyserial version (3.5), I suspect at some point inside this library there’s some CR-LF formatting that makes the payload un-decodable. The payload is:
{'task': '/ledarr_act', 'led': {'LEDArrMode': 0, 'led_array': [{'id': 0, 'r': 255, 'g': 255, 'b': 255}, {'id': 1, 'r': 255, 'g': 255, 'b': 255}, {'id': 2, 'r': 255, 'g': 255, 'b': 255}, {'id': 3, 'r': 255, 'g': 255, 'b': 255}, {'id': 4, 'r': 255, 'g': 255, 'b': 255}, {'id': 5, 'r': 255, 'g': 255, 'b': 255}, {'id': 6, 'r': 255, 'g': 255, 'b': 255}, {'id': 7, 'r': 255, 'g': 255, 'b': 255}, {'id': 8, 'r': 255, 'g': 255, 'b': 255}, {'id': 9, 'r': 255, 'g': 255, 'b': 255}, {'id': 10, 'r': 255, 'g': 255, 'b': 255}, {'id': 11, 'r': 255, 'g': 255, 'b': 255}, {'id': 12, 'r': 255, 'g': 255, 'b': 255}, {'id': 13, 'r': 255, 'g': 255, 'b': 255}, {'id': 14, 'r': 255, 'g': 255, 'b': 255}, {'id': 15, 'r': 255, 'g': 255, 'b': 255}, {'id': 16, 'r': 255, 'g': 255, 'b': 255}, {'id': 17, 'r': 255, 'g': 255, 'b': 255}, {'id': 18, 'r': 255, 'g': 255, 'b': 255}, {'id': 19, 'r': 255, 'g': 255, 'b': 255}, {'id': 20, 'r': 255, 'g': 255, 'b': 255}, {'id': 21, 'r': 255, 'g': 255, 'b': 255}, {'id': 22, 'r': 255, 'g': 255, 'b': 255}, {'id': 23, 'r': 255, 'g': 255, 'b': 255}, {'id': 24, 'r': 255, 'g': 255, 'b': 255}]}, 'qid': 2}
I also noticed that the Web Serial Tester uses ‘LEDArrMode’: 8 (multi) to set the outer ring, so I tried with different values in the payload but it still fails.
I hope we can get some support on this from some Windows’ user that uses the Led Matrix for pseudo phase contrast.
Mit freundlichen Grüßen
Matías Stingl