Skip to content

simulator: Reload Lua widgets also with when "Reload Lua scripts" command issued #7216

@jurgelenas

Description

@jurgelenas

Is there an existing issue for this problem?

  • I have searched the existing issues

What part of EdgeTX is the focus of this bug?

Simulator

Current Behavior

simuLuaReloadPermanentScripts() reloads only the the tools and I think telemetry scripts.

We could do something like like this:

 void simuLuaReloadWidgets()
 {
 #if defined(LUA) && defined(COLORLCD)
   luaUnregisterWidgets();
   luaClose(&lsWidgets);
   luaInitThemesAndWidgets();
   LayoutFactory::deleteCustomScreens();
   LayoutFactory::loadCustomScreens();
 #endif
 }

And call it in:

 void simuLuaReloadPermanentScripts()
 {
 #if defined(LUA)
   simuLuaReloadWidgets();
   luaState = INTERPRETER_RELOAD_PERMANENT_SCRIPTS;
 #endif
 }

Or introduce another wasm method simuLuaReloadWidgets().

This is targeting mainly #7164.

Expected Behavior

"Reload lua scripts" command reloads widgets in simulator too.

Steps To Reproduce

Version

Nightly (Please give date/commit below)

Transmitter

RadioMaster TX16S MK3

Operating System (OS)

No response

OS Version

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions