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:
@@ -156,17 +156,22 @@ void StandaloneLuaWindow::runLua(event_t evt)
|
||||
luaLcdBuffer = &lcdBuffer;
|
||||
|
||||
TRACE("evt = 0x%x", evt);
|
||||
|
||||
bool hasRun = luaTask(evt, true);
|
||||
|
||||
if (luaState == INTERPRETER_RELOAD_PERMANENT_SCRIPTS) {
|
||||
// Script does not run anymore...
|
||||
TRACE("LUA standalone script exited: deleting window!");
|
||||
deleteLater();
|
||||
}
|
||||
|
||||
bool hasRun = luaTask(evt, RUN_STNDAL_SCRIPT, true);
|
||||
if (hasRun) {
|
||||
#if defined(DEBUG_WINDOWS)
|
||||
TRACE("# StandaloneLuaWindow::invalidate()");
|
||||
#endif
|
||||
invalidate();
|
||||
} else {
|
||||
// Script does not run anymore...
|
||||
TRACE("LUA standalone script exited: deleting window!");
|
||||
deleteLater();
|
||||
// The script was preempted, and the LCD should not be updated yet
|
||||
}
|
||||
|
||||
// Kill global LUA LCD buffer
|
||||
|
||||
Reference in New Issue
Block a user