[Horus] UI continued

This commit is contained in:
Bertrand Songis
2016-02-16 20:45:25 +01:00
parent e72a049683
commit 33910c8721
35 changed files with 301 additions and 75 deletions
+5 -24
View File
@@ -1880,24 +1880,6 @@ void doMixerCalculations()
s_mixer_first_run_done = true;
}
#if defined(COLORLCD)
void loadCustomScreens()
{
for (unsigned int i=0; i<MAX_CUSTOM_SCREENS; i++) {
char name[sizeof(g_model.screenData[i].layoutName)+1];
memset(name, 0, sizeof(name));
strncpy(name, g_model.screenData[i].layoutName, sizeof(g_model.screenData[i].layoutName));
customScreens[i] = loadLayout(name, &g_model.screenData[i].layoutData);
}
if (customScreens[0] == NULL) {
customScreens[0] = registeredLayouts[0]->create(&g_model.screenData[0].layoutData);
}
}
#else
#define loadCustomScreens()
#endif
#if defined(NAVIGATION_STICKS)
uint8_t StickScrollAllowed;
uint8_t StickScrollTimer;
@@ -1938,13 +1920,16 @@ void opentxStart()
}
#endif
#if defined(COLORLCD)
luaInit();
loadTheme();
#endif
#if defined(GUI)
checkAlarm();
checkAll();
#endif
loadCustomScreens();
#if defined(GUI)
if (g_eeGeneral.chkSum != evalChkSum()) {
chainMenu(menuFirstCalib);
@@ -2601,10 +2586,6 @@ int main(void)
lcdInit();
#endif
#if defined(COLORLCD)
theme->load();
#endif
stackPaint();
#if defined(GUI)