diff --git a/libraries/AP_Scripting/AP_Scripting.cpp b/libraries/AP_Scripting/AP_Scripting.cpp index 580760fd9f..02eb82e10d 100644 --- a/libraries/AP_Scripting/AP_Scripting.cpp +++ b/libraries/AP_Scripting/AP_Scripting.cpp @@ -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) { diff --git a/libraries/AP_Scripting/AP_Scripting.h b/libraries/AP_Scripting/AP_Scripting.h index ee2e1a9d0a..d418d865b8 100644 --- a/libraries/AP_Scripting/AP_Scripting.h +++ b/libraries/AP_Scripting/AP_Scripting.h @@ -28,7 +28,7 @@ public: AP_Scripting(const AP_Scripting &other) = delete; AP_Scripting &operator=(const AP_Scripting&) = delete; - bool init(void); + void init(void); bool init_failed(void) const { return _init_failed; } bool enabled(void) const { return _enable != 0; };