Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spinOnce timeout at 5ms #325

Closed
1r0b1n0 opened this issue Oct 3, 2017 · 2 comments
Closed

spinOnce timeout at 5ms #325

1r0b1n0 opened this issue Oct 3, 2017 · 2 comments

Comments

@1r0b1n0
Copy link
Contributor

1r0b1n0 commented Oct 3, 2017

Hi,
While browsing the code I stumbled on this line that seems like a bug :

else if( hardware_.time() - c_time > (SYNC_SECONDS)){

This means that the communication could be reset if we spent more than 5ms processing previous data (callbacks included).
Shouldn't it be something like 5s :
else if( hardware_.time() - c_time > (SYNC_SECONDS*1000)){ ?

@mikepurvis
Copy link
Member

Indeed, this is a units comparison failure! Thanks for the catch— do you mind submitting a PR to correct the issue?

FYI @mikeodr

@supercrazysam
Copy link

@mikepurvis may I ask what would be a reasonable value to set the spin_timeout?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants