-
Notifications
You must be signed in to change notification settings - Fork 59
better support set_cycle in drgroup #2016
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
base: master
Are you sure you want to change the base?
better support set_cycle in drgroup #2016
Conversation
… group is initialized
…oup's cycle boundary. Updated test to test this case.
|
@excaliburtb I lost track of this one over the holiday, I can't recall were you waiting on us to test this branch out in ramtares? |
| long long cycle_tics = (long long)round(rate_in * Trick::JobData::time_tic_value); | ||
| rate_in_tics = cycle_tics; | ||
| next_cycle_in_tics= exec_get_time_tics(); | ||
| if((curr_tic % cycle_tics) != 0) |
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.
I found an instance of Ramtares users calling dr_group.set_cycle(0.0) in the input file today. It ends up throwing a floating point exception. Will fix on our end but it'd be a nice update to have a check for this to prevent the divide by zero. Not sure what the Trick way of handling this is but an ALL CAPS FLASHING RED TEXT ALERT IS NOT NEARLY ENOUGH.
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.
lol. sorry that FPE's aren't severe enough of a signal to not do that. I'll add some code to dox the user and have hitman-looking person stop by user's houses.
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.
it's a good ask. i'll try to include it in this PR
…me_set_cycle_isnt_robust
28e4670 to
7d15a78
Compare
… rates and reset the next_cycle tics to the proper value
Fixes #2015