Open danjampro opened 3 years ago
I added something to #1125 that might help. Essentially any time the serial class tries to read (either via a direct read
or some kind of readline
) there is a risk of it waiting for a response from the device unless you give it a hint
, which is the first (and only) parameter to those functions (and is the number of bytes to read, even with readline(s)
. The preferred way to overcome that is to give a hint equal to the in_waiting
property, which will default to 0
if nothing is there to be read, otherwise the actual number of bytes.
Tests with Birger and Astromechanics focusers on Huntsman have shown that a speed up of ~5x can be achieved by doing this.
See AstroHuntsman/huntsman-pocs#488