From 8e4e2cceeaa1c2ab901e962b561b11c6829f46b3 Mon Sep 17 00:00:00 2001 From: jfrickmann Date: Tue, 3 Aug 2021 17:28:08 -0400 Subject: [PATCH] Fix for issue #537 The function luaResume(...) assumes that it is called alternatingly in the background and the foreground. But on color LCD radios it is only called in the foreground by standalone and tools script, so it got stuck waiting for a foreground call. --- radio/src/lua/interface.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/radio/src/lua/interface.cpp b/radio/src/lua/interface.cpp index 4f2fea594..1c53ca4bd 100644 --- a/radio/src/lua/interface.cpp +++ b/radio/src/lua/interface.cpp @@ -971,7 +971,10 @@ static bool resumeLua(bool init, bool allowLcdUsage) } else #endif + if (lua_status(lsScripts) == LUA_YIELD) return scriptWasRun; + else + luaLcdAllowed = allowLcdUsage; } do {