Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(lua): Do not pass key event that triggered telemetry view to lua #4168

Merged
merged 10 commits into from
Nov 6, 2023
11 changes: 11 additions & 0 deletions radio/src/lua/interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1027,7 +1027,18 @@ static bool resumeLua(bool init, bool allowLcdUsage)
bool scriptWasRun = false;
bool fullGC = !allowLcdUsage;
static uint8_t luaDisplayStatistics = false;

#if defined(PCBTARANIS)
static MenuHandlerFunc oldMenuHandler= (MenuHandlerFunc) NULL;

// clear event buffer after switching to telemetry view
if(menuHandlers[menuLevel]== menuViewTelemetry) {
if(oldMenuHandler!= menuViewTelemetry) luaEmptyEventBuffer();
}
oldMenuHandler= menuHandlers[menuLevel];
#endif
pfeerick marked this conversation as resolved.
Show resolved Hide resolved


// Run in the right interactive mode
if (lua_status(lsScripts) == LUA_YIELD && allowLcdUsage != luaLcdAllowed) {
#if defined(PCBTARANIS)
Expand Down