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.
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
[x] Function & Class comments: All function definitions (usually in the .h file) should have a javadoc style comment at the start of them. For examples, see the functions defined in thunderbots/software/geom. Similarly, all classes should have an associated Javadoc comment explaining the purpose of the class.
[x] Remove all commented out code
[x] Remove extra print statements: for example, those just used for testing
[x] Resolve all TODO's: All TODO (or similar) statements should either be completed or associated with a github issue
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 https://github.com/UBC-Thunderbots/Software/commit/5828d4ef6622a8a3b562a2da36d24954c1ad7f62 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 https://github.com/UBC-Thunderbots/Software/commit/5828d4ef6622a8a3b562a2da36d24954c1ad7f62 as that has an alternative fix with an equivalent effect.