mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-26 09:43:57 -04:00
AP_HAL_Linux: rename system_initialized() and add is_system_initialized()
This commit is contained in:
parent
07f199ea1a
commit
74633e55cc
@ -384,7 +384,7 @@ void HAL_Linux::run(int argc, char* const argv[], Callbacks* callbacks) const
|
||||
// NOTE: See commit 9f5b4ffca ("AP_HAL_Linux_Class: Correct
|
||||
// deadlock, and infinite loop in setup()") for details about the
|
||||
// order of scheduler initialize and setup on Linux.
|
||||
scheduler->system_initialized();
|
||||
scheduler->set_system_initialized();
|
||||
|
||||
// possibly load external modules
|
||||
#if AP_MODULE_SUPPORTED
|
||||
|
@ -292,10 +292,10 @@ void Scheduler::_wait_all_threads()
|
||||
}
|
||||
}
|
||||
|
||||
void Scheduler::system_initialized()
|
||||
void Scheduler::set_system_initialized()
|
||||
{
|
||||
if (_initialized) {
|
||||
AP_HAL::panic("PANIC: scheduler::system_initialized called more than once");
|
||||
AP_HAL::panic("PANIC: scheduler::set_system_initialized called more than once");
|
||||
}
|
||||
|
||||
_initialized = true;
|
||||
|
@ -36,7 +36,8 @@ public:
|
||||
|
||||
void register_timer_failsafe(AP_HAL::Proc, uint32_t period_us) override;
|
||||
|
||||
void system_initialized() override;
|
||||
void set_system_initialized() override;
|
||||
bool is_system_initialized() override { return _initialized; };
|
||||
|
||||
void reboot(bool hold_in_bootloader) override;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user