mirror of
https://github.com/opentx/opentx.git
synced 2025-07-26 01:35:21 +03:00
Fixes #2463 - Code review needed, thanks!
This commit is contained in:
parent
a1f713c721
commit
5fb12915e5
1 changed files with 13 additions and 6 deletions
|
@ -139,24 +139,31 @@ void perMain()
|
||||||
lcdRefreshWait();
|
lcdRefreshWait();
|
||||||
|
|
||||||
// draw LCD from menus or from Lua script
|
// draw LCD from menus or from Lua script
|
||||||
// run Lua scripts that use LCD
|
// run Lua scripts that use LCD
|
||||||
bool scriptWasRun = luaTask(evt, RUN_TELEM_FG_SCRIPT | RUN_STNDAL_SCRIPT, true);
|
|
||||||
|
bool standaloneScriptWasRun = luaTask(evt, RUN_STNDAL_SCRIPT, true);
|
||||||
|
bool refreshScreen = true;
|
||||||
|
if (!standaloneScriptWasRun) {
|
||||||
|
refreshScreen = !luaTask(evt, RUN_TELEM_FG_SCRIPT, true);
|
||||||
|
}
|
||||||
|
|
||||||
t0 = get_tmr10ms() - t0;
|
t0 = get_tmr10ms() - t0;
|
||||||
if (t0 > maxLuaDuration) {
|
if (t0 > maxLuaDuration) {
|
||||||
maxLuaDuration = t0;
|
maxLuaDuration = t0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!scriptWasRun)
|
if (!standaloneScriptWasRun)
|
||||||
{
|
|
||||||
#else
|
#else
|
||||||
lcdRefreshWait(); // WARNING: make sure no code above this line does any change to the LCD display buffer!
|
lcdRefreshWait(); // WARNING: make sure no code above this line does any change to the LCD display buffer!
|
||||||
{
|
const bool refreshScreen = true;
|
||||||
#endif
|
#endif
|
||||||
|
{
|
||||||
// normal GUI from menus
|
// normal GUI from menus
|
||||||
const char *warn = s_warning;
|
const char *warn = s_warning;
|
||||||
uint8_t menu = s_menu_count;
|
uint8_t menu = s_menu_count;
|
||||||
lcd_clear();
|
if (refreshScreen) {
|
||||||
|
lcd_clear();
|
||||||
|
}
|
||||||
if (menuEvent) {
|
if (menuEvent) {
|
||||||
m_posVert = menuEvent == EVT_ENTRY_UP ? g_menuPos[g_menuStackPtr] : 0;
|
m_posVert = menuEvent == EVT_ENTRY_UP ? g_menuPos[g_menuStackPtr] : 0;
|
||||||
m_posHorz = 0;
|
m_posHorz = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue