mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
AP_Scripting: only try to load from ROMFS if HAL_HAVE_AP_ROMFS_EMBEDDED_LUA
is defined
This commit is contained in:
parent
ec762d5609
commit
c7d543f9af
@ -524,10 +524,12 @@ void lua_scripts::run(void) {
|
|||||||
load_all_scripts_in_dir(L, SCRIPTING_DIRECTORY);
|
load_all_scripts_in_dir(L, SCRIPTING_DIRECTORY);
|
||||||
loaded = true;
|
loaded = true;
|
||||||
}
|
}
|
||||||
|
#ifdef HAL_HAVE_AP_ROMFS_EMBEDDED_LUA
|
||||||
if ((dir_disable & uint16_t(AP_Scripting::SCR_DIR::ROMFS)) == 0) {
|
if ((dir_disable & uint16_t(AP_Scripting::SCR_DIR::ROMFS)) == 0) {
|
||||||
load_all_scripts_in_dir(L, "@ROMFS/scripts");
|
load_all_scripts_in_dir(L, "@ROMFS/scripts");
|
||||||
loaded = true;
|
loaded = true;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if (!loaded) {
|
if (!loaded) {
|
||||||
GCS_SEND_TEXT(MAV_SEVERITY_CRITICAL, "Lua: All directory's disabled see SCR_DIR_DISABLE");
|
GCS_SEND_TEXT(MAV_SEVERITY_CRITICAL, "Lua: All directory's disabled see SCR_DIR_DISABLE");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user