[X7/X9/SKY9X] Bad handling of UNEXPECTED_SHUTDOWN !
This commit is contained in:
@@ -2433,6 +2433,10 @@ void opentxInit(OPENTX_INIT_ARGS)
|
|||||||
rtcInit(); // RTC must be initialized before rambackupRestore() is called
|
rtcInit(); // RTC must be initialized before rambackupRestore() is called
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(EEPROM)
|
||||||
|
storageReadAll();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (UNEXPECTED_SHUTDOWN()) {
|
if (UNEXPECTED_SHUTDOWN()) {
|
||||||
unexpectedShutdown = 1;
|
unexpectedShutdown = 1;
|
||||||
}
|
}
|
||||||
@@ -2448,6 +2452,7 @@ void opentxInit(OPENTX_INIT_ARGS)
|
|||||||
LUA_INIT_THEMES_AND_WIDGETS();
|
LUA_INIT_THEMES_AND_WIDGETS();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(EEPROM)
|
||||||
#if defined(RAMBACKUP)
|
#if defined(RAMBACKUP)
|
||||||
if (UNEXPECTED_SHUTDOWN()) {
|
if (UNEXPECTED_SHUTDOWN()) {
|
||||||
rambackupRestore();
|
rambackupRestore();
|
||||||
@@ -2458,6 +2463,7 @@ void opentxInit(OPENTX_INIT_ARGS)
|
|||||||
#else
|
#else
|
||||||
storageReadAll();
|
storageReadAll();
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(SERIAL2)
|
#if defined(SERIAL2)
|
||||||
serial2Init(g_eeGeneral.serial2Mode, MODEL_TELEMETRY_PROTOCOL());
|
serial2Init(g_eeGeneral.serial2Mode, MODEL_TELEMETRY_PROTOCOL());
|
||||||
|
|||||||
Reference in New Issue
Block a user