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