Introduce T-pro and function switches handling

This commit is contained in:
3djc
2021-12-17 17:07:48 +01:00
committed by Raphael Coeffic
parent 69dafd13c0
commit d31482c18b
63 changed files with 1324 additions and 70 deletions
+5 -2
View File
@@ -1,8 +1,11 @@
set(STORAGE_CONVERSIONS 219)
if(PCB STREQUAL X7 AND PCBREV STREQUAL ZORRO)
set(STORAGE_CONVERSIONS 221)
if(PCB STREQUAL X7)
if(PCBREV STREQUAL ZORRO OR PCBREV STREQUAL TPRO)
set(STORAGE_CONVERSIONS 221)
endif()
endif()
message("Storage conversion: ${STORAGE_CONVERSIONS}")
if(STORAGE_CONVERSIONS)
add_definitions(-DSTORAGE_CONVERSIONS=${STORAGE_CONVERSIONS})
@@ -35,6 +35,8 @@
#include <storage/sdcard_common.h>
#endif
#if STORAGE_CONVERSIONS < 220
//
// Summary of all changes between 219 & 220
//
@@ -349,3 +351,5 @@ const char* convertRadioData_219_to_220()
return nullptr;
}
#endif
#endif
@@ -44,6 +44,8 @@ namespace yaml_conv_220 {
const YamlNode* get_partialmodel_nodes();
};
#if STORAGE_CONVERSIONS < 221
#if defined(STORAGE_MODELSLIST)
void patchFilenameToYaml(char* str);
@@ -184,3 +186,5 @@ const char* convertRadioData_220_to_221()
}
#endif
#endif
@@ -92,6 +92,8 @@
#if defined(PCBXLITES) || defined(PCBXLITE)
#define STORAGE_NUM_SWITCHES 6
#elif defined(RADIO_TPRO)
#define STORAGE_NUM_SWITCHES 10
#elif defined(RADIO_TLITE) || defined(RADIO_FAMILY_JUMPER_T12) || defined(RADIO_TX12) || defined(RADIO_T8) || defined(PCBX7ACCESS) || defined(PCBX7)
#define STORAGE_NUM_SWITCHES 8
#elif defined(PCBX9LITES)
@@ -999,6 +999,9 @@ static inline void check_struct()
#elif defined(PCBXLITE)
CHKSIZE(RadioData, 859);
CHKSIZE(ModelData, 6157);
#elif defined(RADIO_TPRO)
CHKSIZE(RadioData, 860);
CHKSIZE(ModelData, 6157);
#elif defined(PCBX7)
CHKSIZE(RadioData, 865);
CHKSIZE(ModelData, 6157);