Fixed Lua error messages in standalone and telemetry scripts - again. There is still a problem that the call to POPUP_WARNING in displayLuaError does not return and the gui goes dark on colorlcd. Could it be long jump?

This commit is contained in:
jfrickmann
2021-07-22 14:56:23 -04:00
parent c76532f33a
commit dcac3cb9da
2 changed files with 11 additions and 9 deletions
+2 -5
View File
@@ -912,15 +912,12 @@ static void luaLoadScripts(bool init, const char * filename = nullptr)
if (initFunction != LUA_NOREF)
TRACE_ERROR("luaLoadScripts(%s): init function: %s\n", getScriptName(idx), lua_tostring(lsScripts, -1));
luaL_unref(lsScripts, LUA_REGISTRYINDEX, initFunction);
lua_settop(lsScripts, 0);
initFunction = LUA_NOREF;
} else
else
TRACE_ERROR("luaLoadScripts(%s): %s\n", getScriptName(idx), lua_tostring(lsScripts, -1));
if (ref == SCRIPT_STANDALONE) {
luaError(lsScripts, sid.state);
luaState = INTERPRETER_RELOAD_PERMANENT_SCRIPTS;
luaError(lsScripts, sid.state, true);
return;
}