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
In hardware_usbserial.py, the delay given by Python/Linux between opening a port and when it is available for writing is undefined. The current convention is to use delays, such as in the original source, as well as for other projects: https://stackoverflow.com/questions/7266558/pyserial-buffer-wont-flush
... however, this still didn't work on my system, the *OF2 setting was not parsed by the RS-HFIQ except for rare situations by chance. Setting the delay longer improved the probability but doesn't really fix the underlying problem.
There appears to be a design flaw in Python or the way Linux interacts with serial where a handshake interaction may help things, such as getting the firmware version *W to confirm that the device is communicating before issuing state commands like *OF2, which don't have a confirmation back.
The odd thing is, strace shows the messages actually being sent out to serial at the OS level:
Fixes for issues #5 and #6
As I never notice #5 , I can't test if your fix solves the described problem, but your fix looks reasonable.
I can reproduce #6 and your pr fixes this issue.
Thanks.
In hardware_usbserial.py, the delay given by Python/Linux between opening a port and when it is available for writing is undefined. The current convention is to use delays, such as in the original source, as well as for other projects:
https://stackoverflow.com/questions/7266558/pyserial-buffer-wont-flush
... however, this still didn't work on my system, the *OF2 setting was not parsed by the RS-HFIQ except for rare situations by chance. Setting the delay longer improved the probability but doesn't really fix the underlying problem.
There appears to be a design flaw in Python or the way Linux interacts with serial where a handshake interaction may help things, such as getting the firmware version *W to confirm that the device is communicating before issuing state commands like *OF2, which don't have a confirmation back.
The odd thing is, strace shows the messages actually being sent out to serial at the OS level:
... perhaps write() doesn't truly wait for the message to be sent. Consequently when flushOutput is invoked, the message is removed from the queue?
Will be submitting a pull request for an improvement soon.
The text was updated successfully, but these errors were encountered: