1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-21 07:15:12 +03:00

The Lua Wizard was broken in 2.0.11

This commit is contained in:
bsongis 2014-09-10 15:35:06 +02:00
parent e22c658ee9
commit f584766fc7
2 changed files with 14 additions and 16 deletions

View file

@ -1748,7 +1748,7 @@ void luaError(uint8_t error)
void luaExec(const char *filename)
{
luaInit();
if (L) {
standaloneScript.state = SCRIPT_NOFILE;
int result = luaLoad(filename, standaloneScript);
// TODO the same with run ...
@ -1760,6 +1760,7 @@ void luaExec(const char *filename)
luaState = INTERPRETER_RELOAD_PERMANENT_SCRIPTS;
}
}
}
void luaDoOneRunStandalone(uint8_t evt)
{

View file

@ -1500,12 +1500,9 @@ enum AUDIO_SOUNDS {
uint8_t outputsCount;
ScriptOutput outputs[MAX_SCRIPT_OUTPUTS];
};
enum InterpreterState {
INTERPRETER_RUNNING_PERMANENT_SCRIPTS,
INTERPRETER_RUNNING_STANDALONE_SCRIPT,
INTERPRETER_RELOAD_PERMANENT_SCRIPTS,
INTERPRETER_PANIC,
};
#define INTERPRETER_RUNNING_STANDALONE_SCRIPT 1
#define INTERPRETER_RELOAD_PERMANENT_SCRIPTS 2
#define INTERPRETER_PANIC 255
extern uint8_t luaState;
extern uint8_t luaScriptsCount;
extern ScriptInternalData standaloneScript;