Do not try to convert the eeprom until radio is fully ON. (#6668)
This commit is contained in:
committed by
Bertrand Songis
parent
3531e29cad
commit
f9903dca66
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user