Lua task preempts long running scripts instead of killing them
Ported to EdgeTX from https://github.com/opentx/opentx/pull/8194
This commit is contained in:
@@ -157,9 +157,6 @@ void menuModelCustomScripts(event_t event)
|
||||
case SCRIPT_SYNTAX_ERROR:
|
||||
lcdDrawText(30*FW+2, y, "(error)");
|
||||
break;
|
||||
case SCRIPT_KILLED:
|
||||
lcdDrawText(29*FW+2, y, "(killed)");
|
||||
break;
|
||||
default:
|
||||
lcdDrawNumber(34*FW, y, luaGetCpuUsed(scriptIndex), RIGHT);
|
||||
lcdDrawChar(34*FW, y, '%');
|
||||
|
||||
@@ -177,7 +177,6 @@ bool displayTelemetryScreen()
|
||||
return false; // requested lua telemetry screen not available
|
||||
case SCRIPT_SYNTAX_ERROR:
|
||||
case SCRIPT_PANIC:
|
||||
case SCRIPT_KILLED:
|
||||
luaError(lsScripts, state, false);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -150,9 +150,6 @@ void menuModelCustomScripts(event_t event)
|
||||
case SCRIPT_SYNTAX_ERROR:
|
||||
lcdDrawText(30*FW+2, y, "(error)");
|
||||
break;
|
||||
case SCRIPT_KILLED:
|
||||
lcdDrawText(29*FW+2, y, "(killed)");
|
||||
break;
|
||||
default:
|
||||
lcdDrawNumber(34*FW, y, luaGetCpuUsed(scriptIndex), RIGHT);
|
||||
lcdDrawChar(34*FW, y, '%');
|
||||
|
||||
@@ -179,7 +179,6 @@ bool displayTelemetryScreen()
|
||||
return false; // requested lua telemetry screen not available
|
||||
case SCRIPT_SYNTAX_ERROR:
|
||||
case SCRIPT_PANIC:
|
||||
case SCRIPT_KILLED:
|
||||
luaError(lsScripts, state, false);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user