Write 'semver' tag with the current firmware version (#1695)

And remove `version`/`variant`.
This commit is contained in:
Raphael Coeffic
2022-03-20 19:18:01 +10:00
committed by GitHub
parent 76ae89d2f2
commit 610326f216
25 changed files with 69 additions and 108 deletions
+5 -10
View File
@@ -215,11 +215,11 @@ void eeConvertModel(int id, int version)
// TODO: error handling
}
bool eeConvert()
bool eeConvert(uint8_t start_version)
{
const char *msg = NULL;
switch (g_eeGeneral.version) {
switch (start_version) {
case 219:
msg = "EEprom Data v219";
break;
@@ -230,8 +230,6 @@ bool eeConvert()
return false;
}
int conversionVersionStart = g_eeGeneral.version;
// Information to the user and wait for key press
g_eeGeneral.backlightMode = e_backlight_mode_on;
g_eeGeneral.backlightBright = 0;
@@ -242,7 +240,8 @@ bool eeConvert()
RAISE_ALERT(STR_STORAGE_WARNING, STR_EEPROM_CONVERTING, NULL, AU_NONE);
// General Settings conversion
int version = conversionVersionStart;
int version = start_version;
(void)version;
sdCheckAndCreateDirectory(RADIO_PATH);
sdCheckAndCreateDirectory(MODELS_PATH);
@@ -259,10 +258,6 @@ bool eeConvert()
convertRadioData_220_to_221();
}
#endif
//TODO: reload from YAML
g_eeGeneral.version = EEPROM_VER;
// storageDirty(EE_GENERAL);
// storageCheck(true);
#if defined(STORAGE_MODELSLIST)
modelslist.clear();
@@ -292,7 +287,7 @@ bool eeConvert()
#else
if (eeModelExists(id)) {
#endif
eeConvertModel(id, conversionVersionStart);
eeConvertModel(id, start_version);
}
}