Re #1875 and #1849: implemented LCD initialization for low temperatures. Initialization skipped in case of watchdog reset or boot-loader exit.

This commit is contained in:
Damjan Adamic
2014-12-03 21:14:07 +01:00
parent e19684063a
commit a539add020
8 changed files with 118 additions and 45 deletions
+13 -13
View File
@@ -2872,16 +2872,18 @@ uint16_t stack_free()
void opentxInit(OPENTX_INIT_ARGS)
{
#if defined(PCBTARANIS) && !defined(SIMU)
CoTickDelay(100); //200ms
lcdInit();
lcdSetRefVolt(g_eeGeneral.contrast);
BACKLIGHT_ON();
CoTickDelay(20); //20ms
Splash();
eeReadAll();
#if defined(CPUARM)
if (UNEXPECTED_SHUTDOWN())
unexpectedShutdown = 1;
#endif
eeReadAll();
#if defined(PCBTARANIS)
lcdInitFinish();
BACKLIGHT_ON();
Splash();
#endif
#if MENUS_LOCK == 1
getMovedSwitch();
@@ -2890,12 +2892,10 @@ void opentxInit(OPENTX_INIT_ARGS)
}
#endif
#if defined(CPUARM)
if (UNEXPECTED_SHUTDOWN())
unexpectedShutdown = 1;
#endif
#if defined(VOICE)
#if defined(CPUARM)
currentSpeakerVolume = requiredSpeakerVolume = g_eeGeneral.speakerVolume+VOLUME_LEVEL_DEF;
#endif
setVolume(g_eeGeneral.speakerVolume+VOLUME_LEVEL_DEF);
#endif