panoptes / POCS

An Observatory Control System for the PANOPTES citizen-science project designed to help find transiting exoplanets! :telescope: :stars:
https://pocs.readthedocs.io/en/latest/
MIT License
80 stars 49 forks source link

Use panoptes-utils `SerialDevice` in `AbstractSerialFocuser` #1124

Open danjampro opened 3 years ago

danjampro commented 3 years ago

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

wtgee commented 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.