Skip to content

Commit

Permalink
AP_Scripting: only try to load from ROMFS if `HAL_HAVE_AP_ROMFS_EMBED…
Browse files Browse the repository at this point in the history
…DED_LUA` is defined
  • Loading branch information
IamPete1 committed Feb 24, 2024
1 parent 1835f1e commit a6cf167
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libraries/AP_Scripting/lua_scripts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down

0 comments on commit a6cf167

Please sign in to comment.