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
It appears that the call to select/pselect in Linux yields the thread, even when data is immediately available, and it should be a noop. I can't find documentation of this behaviour, but it's very clearly evident by monitoring serial_->available() on a sensor which returns data sentences at 50Hz.
I believe the fix is to prepopulate the read buffer from a ::read call prior to the first select call. This prevents select from ever being invoked if sufficient data is immediately available.
This issue affects both the master branch as well as the timespec refactor. I've added the fix for this in a9bf8d8, on the timespec refactor branch (ref #45). Would prefer not to bother with back-porting it.
The text was updated successfully, but these errors were encountered:
It appears that the call to select/pselect in Linux yields the thread, even when data is immediately available, and it should be a noop. I can't find documentation of this behaviour, but it's very clearly evident by monitoring
serial_->available()
on a sensor which returns data sentences at 50Hz.I believe the fix is to prepopulate the read buffer from a
::read
call prior to the first select call. This prevents select from ever being invoked if sufficient data is immediately available.This issue affects both the master branch as well as the timespec refactor. I've added the fix for this in a9bf8d8, on the timespec refactor branch (ref #45). Would prefer not to bother with back-porting it.
The text was updated successfully, but these errors were encountered: