fix: EM when LUA script is running and radio is turned off (#3926)
* fix: EM when LUA script is running and radio is turned off * Improve sequencing
This commit is contained in:
@@ -1171,6 +1171,10 @@ void opentxClose(uint8_t shutdown)
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(LUA)
|
||||
luaClose(&lsScripts);
|
||||
#endif
|
||||
|
||||
#if defined(SDCARD)
|
||||
logsClose();
|
||||
#endif
|
||||
@@ -1209,11 +1213,6 @@ void opentxClose(uint8_t shutdown)
|
||||
lsWidgets = 0;
|
||||
#endif
|
||||
#endif
|
||||
#if defined(LUA)
|
||||
// the script context needs to be closed *after*
|
||||
// the widgets, as it has been the first to be opened
|
||||
luaClose(&lsScripts);
|
||||
#endif
|
||||
|
||||
#if defined(SDCARD)
|
||||
sdDone();
|
||||
|
||||
Reference in New Issue
Block a user