From cc25575b3a21afa211d09bb5cae9a7a7ce322a3b Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 5 Jan 2016 16:31:06 +1100 Subject: [PATCH] AP_Scheduler: prevent a startup crash in autotest for Rover --- libraries/AP_Scheduler/AP_Scheduler.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/AP_Scheduler/AP_Scheduler.cpp b/libraries/AP_Scheduler/AP_Scheduler.cpp index 7365ae1628..67e9bd9eea 100644 --- a/libraries/AP_Scheduler/AP_Scheduler.cpp +++ b/libraries/AP_Scheduler/AP_Scheduler.cpp @@ -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