AP_HAL_SITL: rename system_initialized() and add is_system_initialized()

This commit is contained in:
Andy Piper 2020-12-23 11:28:14 +00:00 committed by Andrew Tridgell
parent 526ae5d2f4
commit 253ce18184
3 changed files with 4 additions and 3 deletions

View File

@ -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")) {

View File

@ -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");

View File

@ -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;