mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-11-07 04:40:33 +08:00
AP_Scripting: init sends failure message
This commit is contained in:
1 parent
356ece6682
commit
c78112564c
2 files changed
+4
-6
No files matched your search
@@ -79,19 +79,17 @@ AP_Scripting::AP_Scripting() {
|
||||
_singleton = this;
|
||||
}
|
||||
|
||||
bool AP_Scripting::init(void) {
|
||||
void AP_Scripting::init(void) {
|
||||
if (!_enable) {
|
||||
return true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!hal.scheduler->thread_create(FUNCTOR_BIND_MEMBER(&AP_Scripting::thread, void),
|
||||
"Scripting", SCRIPTING_STACK_SIZE, AP_HAL::Scheduler::PRIORITY_SCRIPTING, 0)) {
|
||||
gcs().send_text(MAV_SEVERITY_CRITICAL, "Could not create scripting stack (%d)", SCRIPTING_STACK_SIZE);
|
||||
gcs().send_text(MAV_SEVERITY_ERROR, "Scripting failed to start");
|
||||
_init_failed = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void AP_Scripting::thread(void) {
|
||||
|
||||
Reference in new issue
Block a user