From 4f240887196ce9102e535069fdf6872365f162ce Mon Sep 17 00:00:00 2001 From: 3djc Date: Sun, 23 Oct 2016 14:41:05 +0200 Subject: [PATCH 1/3] Enable permanent scripts on Horus --- radio/src/lua/interface.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/radio/src/lua/interface.cpp b/radio/src/lua/interface.cpp index 52f9e5501..8cdb48b0a 100644 --- a/radio/src/lua/interface.cpp +++ b/radio/src/lua/interface.cpp @@ -330,7 +330,6 @@ bool luaLoadMixScript(uint8_t index) bool luaLoadFunctionScript(uint8_t index) { CustomFunctionData & fn = g_model.customFn[index]; - if (fn.func == FUNC_PLAY_SCRIPT && ZEXIST(fn.play.name)) { if (luaScriptsCount < MAX_SCRIPTS) { ScriptInternalData & sid = scriptInternalData[luaScriptsCount++]; @@ -739,9 +738,9 @@ bool luaTask(event_t evt, uint8_t scriptType, bool allowLcdUsage) #if !defined(COLORLCD) luaInit(); if (luaState == INTERPRETER_PANIC) return false; +#endif luaLoadPermanentScripts(); if (luaState == INTERPRETER_PANIC) return false; -#endif } for (int i=0; i Date: Sun, 23 Oct 2016 14:42:59 +0200 Subject: [PATCH 2/3] Cosmetics --- radio/src/lua/interface.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/radio/src/lua/interface.cpp b/radio/src/lua/interface.cpp index 8cdb48b0a..544c2171d 100644 --- a/radio/src/lua/interface.cpp +++ b/radio/src/lua/interface.cpp @@ -330,6 +330,7 @@ bool luaLoadMixScript(uint8_t index) bool luaLoadFunctionScript(uint8_t index) { CustomFunctionData & fn = g_model.customFn[index]; + if (fn.func == FUNC_PLAY_SCRIPT && ZEXIST(fn.play.name)) { if (luaScriptsCount < MAX_SCRIPTS) { ScriptInternalData & sid = scriptInternalData[luaScriptsCount++]; From 4825ffe2f3449b455a6e03d4f0981829101230c7 Mon Sep 17 00:00:00 2001 From: 3djc Date: Sun, 23 Oct 2016 14:44:07 +0200 Subject: [PATCH 3/3] Cosmetics --- radio/src/lua/interface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/radio/src/lua/interface.cpp b/radio/src/lua/interface.cpp index 544c2171d..926ffaa1d 100644 --- a/radio/src/lua/interface.cpp +++ b/radio/src/lua/interface.cpp @@ -330,7 +330,7 @@ bool luaLoadMixScript(uint8_t index) bool luaLoadFunctionScript(uint8_t index) { CustomFunctionData & fn = g_model.customFn[index]; - + if (fn.func == FUNC_PLAY_SCRIPT && ZEXIST(fn.play.name)) { if (luaScriptsCount < MAX_SCRIPTS) { ScriptInternalData & sid = scriptInternalData[luaScriptsCount++];