First working LUA widget: Timer2

This commit is contained in:
Raphael Coeffic
2021-05-06 12:55:59 +02:00
committed by Raphael Coeffic
parent ca36c9595e
commit 72a7409d10
8 changed files with 171 additions and 155 deletions
+2 -21
View File
@@ -1833,27 +1833,8 @@ void opentxInit()
#if defined(COLORLCD)
if (!globalData.unexpectedShutdown) {
// g_model.topbarData is still zero here (because it was not yet read from SDCARD),
// but we only remember the pointer to in in constructor.
// The storageReadAll() needs topbar object, so it must be created here
// TODO topbar removed from new UI for now
// topbar = new Topbar(&g_model.topbarData);
// #if __clang__
// // clang does not like this at all, turn into a warning so that -Werror does not stop here
// // taking address of packed member 'topbarData' of class or structure 'ModelData' may result in an unaligned pointer value [-Werror,-Waddress-of-packed-member]
// #pragma clang diagnostic push
// #pragma clang diagnostic warning "-Waddress-of-packed-member"
// #endif
// topbar = new Topbar((Topbar::PersistentData*)(((uint8_t*)&g_model) + offsetof(ModelData,topbarData)));
// #if __clang__
// // Restore warnings
// #pragma clang diagnostic pop
// #endif
// lua widget state must also be prepared before the call to storageReadAll()
LUA_INIT_THEMES_AND_WIDGETS();
// ??? lua widget state must be prepared before the call to storageReadAll()
luaInitThemesAndWidgets();
}
#endif