chore: Remove support for binary storage format (#2900)

This commit is contained in:
Raphael Coeffic
2022-12-23 13:05:57 +10:00
committed by GitHub
parent 919b83af42
commit f9bac7ba9b
50 changed files with 248 additions and 23617 deletions
-25
View File
@@ -38,8 +38,6 @@
#include "storage/eeprom_rlc.h"
#endif
#include "storage/conversions/conversions.h"
const char * readYamlFile(const char* fullpath, const YamlParserCalls* calls, void* parser_ctx, ChecksumResult* checksum_result)
{
FIL file;
@@ -177,30 +175,7 @@ const char * loadRadioSettings()
if ( (f_stat(RADIO_SETTINGS_YAML_PATH, &fno) != FR_OK) && ((f_stat(RADIO_SETTINGS_TMPFILE_YAML_PATH, &fno) != FR_OK)) ) {
// If neither the radio configuraion YAML file or the temporary file generated on write exist, this must be a first run with YAML support.
// - thus requiring a conversion from binary to YAML.
#if STORAGE_CONVERSIONS < 221
#if defined(STORAGE_MODELSLIST)
uint8_t version;
const char* error = loadFileBin(RADIO_SETTINGS_PATH, nullptr, 0, &version);
if (error) {
TRACE("loadRadioSettings error=%s", error);
return error;
}
convertBinRadioData(RADIO_SETTINGS_PATH, version);
#elif defined(EEPROM_RLC)
// Load from EEPROM
uint8_t versions[3];
uint16_t* variant = (uint16_t*)&versions[1];
if (!eepromOpen() || (eeLoadGeneralSettingsData(versions, 3) != 3)
|| (*variant != EEPROM_VARIANT)) {
return "ERROR";
}
eeConvert(versions[0]);
#else
#error "Unsupported conversion format"
#endif
#else
return "no radio settings";
#endif
}
#if defined(DEFAULT_INTERNAL_MODULE)