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:
3djc
2023-08-15 10:18:01 +10:00
committed by Peter Feerick
parent 343ea0660f
commit d2c2fd6426
+4 -5
View File
@@ -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();