AP_Scheduler: prevent a startup crash in autotest for Rover

This commit is contained in:
Andrew Tridgell 2016-01-05 16:31:06 +11:00
parent d72a833ad4
commit cc25575b3a
1 changed files with 3 additions and 1 deletions

View File

@ -61,7 +61,9 @@ const AP_Param::GroupInfo AP_Scheduler::var_info[] = {
// constructor
AP_Scheduler::AP_Scheduler(void)
{
_loop_rate_hz.set_default(SCHEDULER_DEFAULT_LOOP_RATE);
#if !SCHEDULER_EXPOSE_LOOP_RATE_PARAMETER
_loop_rate_hz.set(SCHEDULER_DEFAULT_LOOP_RATE);
#endif
AP_Param::setup_object_defaults(this, var_info);
// only allow 50 to 400 Hz