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:
parent
3531e29cad
commit
f9903dca66
7 changed files with 30 additions and 10 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue