diff --git a/libraries/AP_HAL_SITL/HAL_SITL_Class.cpp b/libraries/AP_HAL_SITL/HAL_SITL_Class.cpp index b791c7434b..a034fedd1c 100644 --- a/libraries/AP_HAL_SITL/HAL_SITL_Class.cpp +++ b/libraries/AP_HAL_SITL/HAL_SITL_Class.cpp @@ -211,7 +211,7 @@ void HAL_SITL::run(int argc, char * const argv[], Callbacks* callbacks) const fill_stack_nan(); callbacks->setup(); - scheduler->system_initialized(); + scheduler->set_system_initialized(); #ifndef HAL_NO_LOGGING if (getenv("SITL_WATCHDOG_RESET")) { diff --git a/libraries/AP_HAL_SITL/Scheduler.cpp b/libraries/AP_HAL_SITL/Scheduler.cpp index 4c9a11e7d7..348d8118f9 100644 --- a/libraries/AP_HAL_SITL/Scheduler.cpp +++ b/libraries/AP_HAL_SITL/Scheduler.cpp @@ -143,7 +143,7 @@ void Scheduler::register_timer_failsafe(AP_HAL::Proc failsafe, uint32_t period_u _failsafe = failsafe; } -void Scheduler::system_initialized() { +void Scheduler::set_system_initialized() { if (_initialized) { AP_HAL::panic( "PANIC: scheduler system initialized called more than once"); diff --git a/libraries/AP_HAL_SITL/Scheduler.h b/libraries/AP_HAL_SITL/Scheduler.h index 8d30b3ecf2..a6bbb84a65 100644 --- a/libraries/AP_HAL_SITL/Scheduler.h +++ b/libraries/AP_HAL_SITL/Scheduler.h @@ -28,7 +28,8 @@ public: void register_timer_failsafe(AP_HAL::Proc, uint32_t period_us) override; bool in_main_thread() const override; - void system_initialized() override; + bool is_system_initialized() override { return _initialized; }; + void set_system_initialized() override; void reboot(bool hold_in_bootloader) override;