Skip to content

Commit

Permalink
Do not send kbd events to luaTask if neiter telemetry nor standalone …
Browse files Browse the repository at this point in the history
…script screen are active
  • Loading branch information
bug400 committed Oct 20, 2023
1 parent bea6625 commit f99ad97
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions radio/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -427,14 +427,19 @@ void guiMain(event_t evt)
#elif defined(GUI)

bool handleGui(event_t event) {
bool refreshNeeded;
bool refreshNeeded;

#if defined(LUA)
refreshNeeded = luaTask(event, true);
// LUA telemetry foreground script active
if (menuHandlers[menuLevel] == menuViewTelemetry &&
TELEMETRY_SCREEN_TYPE(s_frsky_view) == TELEMETRY_SCREEN_TYPE_SCRIPT) {
refreshNeeded = luaTask(event, true);
menuHandlers[menuLevel](event);
}
else if (scriptInternalData[0].reference != SCRIPT_STANDALONE)
// standalone foreground script active
else if (scriptInternalData[0].reference == SCRIPT_STANDALONE)
refreshNeeded = luaTask(event, true);
else
#endif
// No foreground Lua script is running - clear the screen show normal menu
{
Expand Down

0 comments on commit f99ad97

Please sign in to comment.