Fix LUA=NO, remove ModelMixerScriptsPage when support not enabled (#869)

* Trying to align LUA options with radio/src/CMakeLists.txt
-DLUA=NO:  no Lua of any kind
-DLUA=ON:  everything but mixer scripts
-DLUA=YES: also mixer scripts

* Color LCD with -DLUA=NO is probably a rare combination, so it needed a little help with #defines.

* Some strange error using floor function w/o <math> - probably because -DLUA=NO is not normally used w/ color.
This commit is contained in:
Jesper Frickmann
2021-10-11 10:37:06 +11:00
committed by GitHub
parent 313e60b3dd
commit d3ab7f9c61
4 changed files with 10 additions and 9 deletions
+3 -2
View File
@@ -1499,11 +1499,12 @@ void opentxClose(uint8_t shutdown)
//TODO: In fact we want only to empty the trash (private method)
MainWindow::instance()->run();
#if defined(LUA)
luaUnregisterWidgets();
luaClose(&lsWidgets);
lsWidgets = 0;
#endif
#endif
#if defined(SDCARD)
sdDone();
@@ -1516,7 +1517,7 @@ void opentxResume()
TRACE("opentxResume");
sdMount();
#if defined(COLORLCD)
#if defined(COLORLCD) && defined(LUA)
// reload widgets
luaInitThemesAndWidgets();
#endif