|
|
|
@ -96,6 +96,15 @@ void AP_Scripting::init(void) {
@@ -96,6 +96,15 @@ void AP_Scripting::init(void) {
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const char *dir_name = SCRIPTING_DIRECTORY; |
|
|
|
|
|
|
|
|
|
if (!AP::FS().mkdir(dir_name)) { |
|
|
|
|
gcs().send_text(MAV_SEVERITY_INFO, "Lua: created new directory (%s)", dir_name); |
|
|
|
|
} else if (errno != EEXIST) { |
|
|
|
|
gcs().send_text(MAV_SEVERITY_INFO, "Lua: failed to create (%s)", dir_name); |
|
|
|
|
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); |
|
|
|
|