1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-25 09:15:38 +03:00

Do not try to convert the eeprom until radio is fully ON. (#6668)

This commit is contained in:
Raphael Coeffic 2019-08-27 10:20:03 +02:00 committed by Bertrand Songis
parent 3531e29cad
commit f9903dca66
7 changed files with 30 additions and 10 deletions

View file

@ -256,13 +256,18 @@ void writeModel(int index)
writeFile(index+1, (uint8_t *)&g_model, sizeof(g_model));
}
bool eeLoadGeneral()
bool eeLoadGeneral(bool allowConversion)
{
eeLoadGeneralSettingsData();
if (g_eeGeneral.version != EEPROM_VER) {
TRACE("EEPROM version %d instead of %d", g_eeGeneral.version, EEPROM_VER);
#if defined(PCBSKY9X)
if (!allowConversion) {
storageClearRadioSetting();
return true; // prevent eeprom from being wiped
}
if (!eeConvert()) {
return false;
}