while working with the code, I noticed that a lot of times (especially in display, for example sendop), the transfer function is called with a 0 expected returned data length.
Would it be worth optimizing the usbcontrol to not send a response if the expected receivelen is 0 ?
Or do you have the acking behavior because there are circumstances where the modulo would drop command packets ?
I was trying to optimize the ~100ms round-trip times I was seeing in the transfer() function for display ops and by not calling receivePacket() if the receivelength was 0, I was able to significantly improve the responsiveness of the Display modulo to button presses.
Of course, I have the advantage of receiving from the port in a different thread, so I also just drop the empty CodeReceive packets when I get them later.
The same effect could be achieved better if the usbcontrol sketch did not send acks in these circumstances.
Also curious if you see a perceptible difference in responsiveness of the buttons when you run the DisplayExample in python vs in the Arduino app. (I noticed that the C++ code in Modulo.cpp does not wait for acks in the _transferModulo function if receiveLen = 0)