AP_HAL_ChibiOS: rename system_initialized() and add is_system_initialized()

This commit is contained in:
Andy Piper 2020-12-23 11:26:59 +00:00 committed by Andrew Tridgell
parent 9e7c60178d
commit 07f199ea1a
3 changed files with 5 additions and 4 deletions

View File

@ -236,7 +236,7 @@ static void main_loop()
schedulerInstance.watchdog_pat();
hal.scheduler->system_initialized();
hal.scheduler->set_system_initialized();
thread_running = true;
chRegSetThreadName(SKETCHNAME);

View File

@ -565,10 +565,10 @@ void Scheduler::_storage_thread(void* arg)
}
}
void Scheduler::system_initialized()
void Scheduler::set_system_initialized()
{
if (_initialized) {
AP_HAL::panic("PANIC: scheduler::system_initialized called"
AP_HAL::panic("PANIC: scheduler::set_system_initialized called"
"more than once");
}
_initialized = true;

View File

@ -92,7 +92,8 @@ public:
bool in_main_thread() const override { return get_main_thread() == chThdGetSelfX(); }
void system_initialized() override;
void set_system_initialized() override;
bool is_system_initialized() override { return _initialized; };
void hal_initialized() { _hal_initialized = true; }
bool check_called_boost(void);