From 0bad169008483b0a8754754fb42aff8c37aa1a02 Mon Sep 17 00:00:00 2001 From: Bertrand Songis Date: Sun, 17 Jan 2016 23:29:38 +0100 Subject: [PATCH] GUI simplification. Needs to be reviewed, but it is better on Horus like this --- radio/src/main_arm.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/radio/src/main_arm.cpp b/radio/src/main_arm.cpp index 6b7604c0c..bebad8960 100644 --- a/radio/src/main_arm.cpp +++ b/radio/src/main_arm.cpp @@ -118,10 +118,9 @@ void guiMain(evt_t evt) // draw LCD from menus or from Lua script // run Lua scripts that use LCD - bool standaloneScriptWasRun = luaTask(evt, RUN_STNDAL_SCRIPT, true); - if (!standaloneScriptWasRun) { - luaTask(evt, RUN_TELEM_FG_SCRIPT, true); - refreshNeeded = true; + refreshNeeded = luaTask(evt, RUN_STNDAL_SCRIPT, true); + if (!refreshNeeded) { + refreshNeeded = luaTask(evt, RUN_TELEM_FG_SCRIPT, true); } t0 = get_tmr10ms() - t0; @@ -130,10 +129,9 @@ void guiMain(evt_t evt) } #else lcdRefreshWait(); // WARNING: make sure no code above this line does any change to the LCD display buffer! - const bool standaloneScriptWasRun = false; #endif - if (!standaloneScriptWasRun) { + if (!refreshNeeded) { while (1) { // normal GUI from menus const char * warn = warningText;