Fixes related to storage conversions removal (#2074)
This commit is contained in:
@@ -150,6 +150,8 @@ include(gui/CMakeLists.txt)
|
|||||||
|
|
||||||
set(SRC ${SRC} storage/storage_common.cpp)
|
set(SRC ${SRC} storage/storage_common.cpp)
|
||||||
|
|
||||||
|
include(storage/conversions/CMakeLists.txt)
|
||||||
|
|
||||||
if(${STORAGE} STREQUAL SDCARD)
|
if(${STORAGE} STREQUAL SDCARD)
|
||||||
set(SRC ${SRC} storage/sdcard_common.cpp)
|
set(SRC ${SRC} storage/sdcard_common.cpp)
|
||||||
if(${STORAGE_FORMAT} STREQUAL RAW)
|
if(${STORAGE_FORMAT} STREQUAL RAW)
|
||||||
@@ -160,8 +162,10 @@ if(${STORAGE} STREQUAL SDCARD)
|
|||||||
add_definitions(-DSDCARD_YAML)
|
add_definitions(-DSDCARD_YAML)
|
||||||
include(storage/yaml/CMakeLists.txt)
|
include(storage/yaml/CMakeLists.txt)
|
||||||
if (${STORAGE_CONVERT} STREQUAL EEPROM_RLC)
|
if (${STORAGE_CONVERT} STREQUAL EEPROM_RLC)
|
||||||
set(SRC ${SRC} storage/eeprom_rlc.cpp)
|
if (STORAGE_CONVERSIONS LESS 221)
|
||||||
add_definitions(-DEEPROM_RLC)
|
set(SRC ${SRC} storage/eeprom_rlc.cpp)
|
||||||
|
add_definitions(-DEEPROM_RLC)
|
||||||
|
endif()
|
||||||
else(${STORAGE_CONVERT} STREQUAL RAW)
|
else(${STORAGE_CONVERT} STREQUAL RAW)
|
||||||
set(SRC ${SRC} storage/sdcard_raw.cpp)
|
set(SRC ${SRC} storage/sdcard_raw.cpp)
|
||||||
endif()
|
endif()
|
||||||
@@ -186,8 +190,6 @@ elseif(${STORAGE} STREQUAL EEPROM)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
include(storage/conversions/CMakeLists.txt)
|
|
||||||
|
|
||||||
if(RTC_BACKUP_RAM)
|
if(RTC_BACKUP_RAM)
|
||||||
add_definitions(-DRTC_BACKUP_RAM)
|
add_definitions(-DRTC_BACKUP_RAM)
|
||||||
set(SRC ${SRC} storage/rlc.cpp)
|
set(SRC ${SRC} storage/rlc.cpp)
|
||||||
|
|||||||
@@ -19,6 +19,8 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if STORAGE_CONVERSIONS < 220
|
||||||
|
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
@@ -35,8 +37,6 @@
|
|||||||
#include <storage/sdcard_common.h>
|
#include <storage/sdcard_common.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if STORAGE_CONVERSIONS < 220
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Summary of all changes between 219 & 220
|
// Summary of all changes between 219 & 220
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -107,6 +107,7 @@ const char * loadRadioSettings()
|
|||||||
{
|
{
|
||||||
FILINFO fno;
|
FILINFO fno;
|
||||||
if (f_stat(RADIO_SETTINGS_YAML_PATH, &fno) != FR_OK) {
|
if (f_stat(RADIO_SETTINGS_YAML_PATH, &fno) != FR_OK) {
|
||||||
|
#if STORAGE_CONVERSIONS < 221
|
||||||
#if defined(STORAGE_MODELSLIST)
|
#if defined(STORAGE_MODELSLIST)
|
||||||
uint8_t version;
|
uint8_t version;
|
||||||
const char* error = loadFileBin(RADIO_SETTINGS_PATH, nullptr, 0, &version);
|
const char* error = loadFileBin(RADIO_SETTINGS_PATH, nullptr, 0, &version);
|
||||||
@@ -126,6 +127,9 @@ const char * loadRadioSettings()
|
|||||||
eeConvert(versions[0]);
|
eeConvert(versions[0]);
|
||||||
#else
|
#else
|
||||||
#error "Unsupported conversion format"
|
#error "Unsupported conversion format"
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
return "no radio settings";
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user