Load radio settings before power on delay is evaluated

Resolves #1366
This commit is contained in:
Raphael Coeffic
2022-01-10 11:10:49 +10:00
committed by Peter Feerick
parent 733e272601
commit 9afae09f31
3 changed files with 15 additions and 1 deletions
+7 -1
View File
@@ -1778,8 +1778,14 @@ void opentxInit()
menuHandlers[1] = menuModelSelect; menuHandlers[1] = menuModelSelect;
#endif #endif
#if defined(EEPROM) #if defined(STARTUP_ANIMATION)
lcdRefreshWait();
lcdClear();
lcdRefresh();
lcdRefreshWait();
bool radioSettingsValid = storageReadRadioSettings(false); bool radioSettingsValid = storageReadRadioSettings(false);
(void)radioSettingsValid;
#endif #endif
BACKLIGHT_ENABLE(); // we start the backlight during the startup animation BACKLIGHT_ENABLE(); // we start the backlight during the startup animation
+2
View File
@@ -76,6 +76,8 @@ uint8_t findEmptyModel(uint8_t id, bool down);
#endif #endif
bool storageReadRadioSettings(bool checks);
const char * loadRadioSettings(); const char * loadRadioSettings();
const char * writeGeneralSettings(); const char * writeGeneralSettings();
+6
View File
@@ -475,3 +475,9 @@ const char * restoreModel(uint8_t idx, char *model_name)
} }
#endif #endif
bool storageReadRadioSettings(bool checks)
{
if (!sdMounted()) sdInit();
return loadRadioSettingsYaml() == nullptr;
}