Limit timeout for end of slew to avoid overflow
This commit is contained in:
parent
4593471ad5
commit
52d0c9a057
1 changed files with 3 additions and 1 deletions
|
@ -353,7 +353,9 @@ initiate_slew(void)
|
||||||
fast_slewing = 1;
|
fast_slewing = 1;
|
||||||
slew_start_tv = T0a;
|
slew_start_tv = T0a;
|
||||||
|
|
||||||
/* Set up timeout for end of slew */
|
/* Set up timeout for end of slew, limit to one week */
|
||||||
|
if (dseconds > 3600 * 24 * 7)
|
||||||
|
dseconds = 3600 * 24 * 7;
|
||||||
UTI_AddDoubleToTimeval(&T0a, dseconds, &end_of_slew);
|
UTI_AddDoubleToTimeval(&T0a, dseconds, &end_of_slew);
|
||||||
|
|
||||||
slew_timeout_id = SCH_AddTimeout(&end_of_slew, handle_end_of_slew, NULL);
|
slew_timeout_id = SCH_AddTimeout(&end_of_slew, handle_end_of_slew, NULL);
|
||||||
|
|
Loading…
Reference in a new issue