-
Notifications
You must be signed in to change notification settings - Fork 110
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
Robocup bug fix of Thunderloop clock #3317
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Side note, we should consider using std::chrono::steady_clock
and std::this_thread::sleep_for
instead of the libc functions. Then we could also get rid of the helper functions for converting timespec to milliseconds/nanoseconds and just use the std::chrono
API
…into clock_fixes_robocup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, pending CI
Please fill out the following before requesting review on this PR
Description
next_shot
is supposed to be an absolute time at which the next thunderloop iteration is supposed to run. Thus to maintain a constant interval inbetween iterations it should be incremented by a constant amount. Before this PR thunderloop would run at shorter intervals if it took longer to run the current iteration.The fix done in 5828d4e was different, changing the entire Thunderloop clock to use a relative sleep. Feel free to comment if you believe that was a better fix than this.
Testing Done
No on robot testing done yet, but Thunderloop builds fine.
Resolved Issues
Length Justification and Key Files to Review
It is not long.
Review Checklist
It is the reviewers responsibility to also make sure every item here has been covered
.h
file) should have a javadoc style comment at the start of them. For examples, see the functions defined inthunderbots/software/geom
. Similarly, all classes should have an associated Javadoc comment explaining the purpose of the class.TODO
(or similar) statements should either be completed or associated with a github issueAgain compare with 5828d4e as that has an alternative fix with an equivalent effect.