Removed on-the-fly model conversions

This makes no sense for YAML model files, only for BIN models (when YAML is not the format of choice).
This commit is contained in:
Raphael Coeffic
2021-11-10 11:07:03 +01:00
parent 88a9b1c6d9
commit 4a5a0be38c
6 changed files with 57 additions and 34 deletions
+2 -12
View File
@@ -120,12 +120,11 @@ const char * createModel()
}
#endif
const char * loadModel(char * filename, bool alarms)
const char* loadModel(char* filename, bool alarms)
{
uint8_t version;
preModelLoad();
const char * error = readModel(filename, (uint8_t *)&g_model, sizeof(g_model), &version);
const char* error = readModel(filename, (uint8_t*)&g_model, sizeof(g_model));
if (error) {
TRACE("loadModel error=%s", error);
@@ -139,15 +138,6 @@ const char * loadModel(char * filename, bool alarms)
return error;
}
// Conversions from EEPROM are done in batch when converting the radio file.
// It is not supported on a model by model base when loaded.
#if defined(STORAGE_CONVERSIONS) && !defined(EEPROM_RLC)
if (version < EEPROM_VER) {
convertBinModelData(filename, version);
}
// TODO: reload model afterwards
#endif
postModelLoad(alarms);
return nullptr;
}