diff --git a/radio/src/datastructs_private.h b/radio/src/datastructs_private.h index c4453ee69..fffec8530 100644 --- a/radio/src/datastructs_private.h +++ b/radio/src/datastructs_private.h @@ -834,6 +834,7 @@ PACK(struct RadioData { // Real attributes NOBACKUP(uint8_t version); + CUST_ATTR(board,nullptr,w_board); NOBACKUP(uint16_t variant SKIP); CalibData calib[NUM_STICKS + STORAGE_NUM_POTS + STORAGE_NUM_SLIDERS + STORAGE_NUM_MOUSE_ANALOGS] NO_IDX; NOBACKUP(uint16_t chkSum SKIP); @@ -867,12 +868,10 @@ PACK(struct RadioData { NOBACKUP(uint8_t templateSetup); // RETA order for receiver channels NOBACKUP(int8_t PPM_Multiplier); NOBACKUP(int8_t hapticLength CUST(r_5pos,w_5pos)); - N_HORUS_FIELD(N_TARANIS_FIELD(uint8_t spare2 SKIP)); - N_HORUS_FIELD(N_TARANIS_FIELD(uint8_t stickReverse)); NOBACKUP(int8_t beepLength:3 CUST(r_5pos,w_5pos)); NOBACKUP(int8_t hapticStrength:3 CUST(r_5pos,w_5pos)); NOBACKUP(uint8_t gpsFormat:1); - NOBACKUP(uint8_t unexpectedShutdown:1); + NOBACKUP(uint8_t unexpectedShutdown:1 SKIP); NOBACKUP(uint8_t speakerPitch CUST(r_spPitch,w_spPitch)); NOBACKUP(int8_t speakerVolume CUST(r_vol,w_vol)); NOBACKUP(int8_t vBatMin CUST(r_vbat_min,w_vbat_min)); diff --git a/radio/src/storage/conversions/yaml/yaml_datastructs_funcs.cpp b/radio/src/storage/conversions/yaml/yaml_datastructs_funcs.cpp index cb1104166..5a8951c25 100644 --- a/radio/src/storage/conversions/yaml/yaml_datastructs_funcs.cpp +++ b/radio/src/storage/conversions/yaml/yaml_datastructs_funcs.cpp @@ -26,6 +26,12 @@ #define GVAR_SMALL 128 #define VOLUME_LEVEL_DEF 12 +bool w_board(void* user, uint8_t* data, uint32_t bitoffs, + yaml_writer_func wf, void* opaque) +{ + return wf(opaque, FLAVOUR, sizeof(FLAVOUR)-1); +} + #define in_read_weight nullptr bool in_write_weight(const YamlNode* node, uint32_t val, yaml_writer_func wf, diff --git a/radio/src/storage/conversions/yaml/yaml_datastructs_nv14.cpp b/radio/src/storage/conversions/yaml/yaml_datastructs_nv14.cpp index 557bb9ad6..09ad00b27 100644 --- a/radio/src/storage/conversions/yaml/yaml_datastructs_nv14.cpp +++ b/radio/src/storage/conversions/yaml/yaml_datastructs_nv14.cpp @@ -357,6 +357,7 @@ static const struct YamlNode struct_OpenTxTheme__PersistentData[] = { }; static const struct YamlNode struct_RadioData[] = { YAML_UNSIGNED( "version", 8 ), + YAML_CUSTOM("board",nullptr,w_board), YAML_PADDING( 16 ), YAML_ARRAY("calib", 48, 9, struct_CalibData, NULL), YAML_PADDING( 16 ), @@ -394,7 +395,7 @@ static const struct YamlNode struct_RadioData[] = { YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ), YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ), YAML_UNSIGNED( "gpsFormat", 1 ), - YAML_UNSIGNED( "unexpectedShutdown", 1 ), + YAML_PADDING( 1 ), YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ), YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ), YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ), diff --git a/radio/src/storage/conversions/yaml/yaml_datastructs_t12.cpp b/radio/src/storage/conversions/yaml/yaml_datastructs_t12.cpp index e6ae90e4e..c8571e569 100644 --- a/radio/src/storage/conversions/yaml/yaml_datastructs_t12.cpp +++ b/radio/src/storage/conversions/yaml/yaml_datastructs_t12.cpp @@ -328,6 +328,7 @@ static const struct YamlNode struct_string_24[] = { }; static const struct YamlNode struct_RadioData[] = { YAML_UNSIGNED( "version", 8 ), + YAML_CUSTOM("board",nullptr,w_board), YAML_PADDING( 16 ), YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL), YAML_PADDING( 16 ), @@ -363,7 +364,7 @@ static const struct YamlNode struct_RadioData[] = { YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ), YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ), YAML_UNSIGNED( "gpsFormat", 1 ), - YAML_UNSIGNED( "unexpectedShutdown", 1 ), + YAML_PADDING( 1 ), YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ), YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ), YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ), diff --git a/radio/src/storage/conversions/yaml/yaml_datastructs_t8.cpp b/radio/src/storage/conversions/yaml/yaml_datastructs_t8.cpp index 6fa0070ef..34add024b 100644 --- a/radio/src/storage/conversions/yaml/yaml_datastructs_t8.cpp +++ b/radio/src/storage/conversions/yaml/yaml_datastructs_t8.cpp @@ -328,6 +328,7 @@ static const struct YamlNode struct_string_24[] = { }; static const struct YamlNode struct_RadioData[] = { YAML_UNSIGNED( "version", 8 ), + YAML_CUSTOM("board",nullptr,w_board), YAML_PADDING( 16 ), YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL), YAML_PADDING( 16 ), @@ -363,7 +364,7 @@ static const struct YamlNode struct_RadioData[] = { YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ), YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ), YAML_UNSIGNED( "gpsFormat", 1 ), - YAML_UNSIGNED( "unexpectedShutdown", 1 ), + YAML_PADDING( 1 ), YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ), YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ), YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ), diff --git a/radio/src/storage/conversions/yaml/yaml_datastructs_tlite.cpp b/radio/src/storage/conversions/yaml/yaml_datastructs_tlite.cpp index 6fa0070ef..34add024b 100644 --- a/radio/src/storage/conversions/yaml/yaml_datastructs_tlite.cpp +++ b/radio/src/storage/conversions/yaml/yaml_datastructs_tlite.cpp @@ -328,6 +328,7 @@ static const struct YamlNode struct_string_24[] = { }; static const struct YamlNode struct_RadioData[] = { YAML_UNSIGNED( "version", 8 ), + YAML_CUSTOM("board",nullptr,w_board), YAML_PADDING( 16 ), YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL), YAML_PADDING( 16 ), @@ -363,7 +364,7 @@ static const struct YamlNode struct_RadioData[] = { YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ), YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ), YAML_UNSIGNED( "gpsFormat", 1 ), - YAML_UNSIGNED( "unexpectedShutdown", 1 ), + YAML_PADDING( 1 ), YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ), YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ), YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ), diff --git a/radio/src/storage/conversions/yaml/yaml_datastructs_tx12.cpp b/radio/src/storage/conversions/yaml/yaml_datastructs_tx12.cpp index ed52b20f5..35ee08c95 100644 --- a/radio/src/storage/conversions/yaml/yaml_datastructs_tx12.cpp +++ b/radio/src/storage/conversions/yaml/yaml_datastructs_tx12.cpp @@ -328,6 +328,7 @@ static const struct YamlNode struct_string_24[] = { }; static const struct YamlNode struct_RadioData[] = { YAML_UNSIGNED( "version", 8 ), + YAML_CUSTOM("board",nullptr,w_board), YAML_PADDING( 16 ), YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL), YAML_PADDING( 16 ), @@ -363,7 +364,7 @@ static const struct YamlNode struct_RadioData[] = { YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ), YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ), YAML_UNSIGNED( "gpsFormat", 1 ), - YAML_UNSIGNED( "unexpectedShutdown", 1 ), + YAML_PADDING( 1 ), YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ), YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ), YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ), diff --git a/radio/src/storage/conversions/yaml/yaml_datastructs_x10.cpp b/radio/src/storage/conversions/yaml/yaml_datastructs_x10.cpp index 0617009af..4c6e21435 100644 --- a/radio/src/storage/conversions/yaml/yaml_datastructs_x10.cpp +++ b/radio/src/storage/conversions/yaml/yaml_datastructs_x10.cpp @@ -378,6 +378,7 @@ static const struct YamlNode struct_OpenTxTheme__PersistentData[] = { }; static const struct YamlNode struct_RadioData[] = { YAML_UNSIGNED( "version", 8 ), + YAML_CUSTOM("board",nullptr,w_board), YAML_PADDING( 16 ), YAML_ARRAY("calib", 48, 15, struct_CalibData, NULL), YAML_PADDING( 16 ), @@ -411,7 +412,7 @@ static const struct YamlNode struct_RadioData[] = { YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ), YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ), YAML_UNSIGNED( "gpsFormat", 1 ), - YAML_UNSIGNED( "unexpectedShutdown", 1 ), + YAML_PADDING( 1 ), YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ), YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ), YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ), diff --git a/radio/src/storage/conversions/yaml/yaml_datastructs_x12s.cpp b/radio/src/storage/conversions/yaml/yaml_datastructs_x12s.cpp index fd88dba4a..4da434bc0 100644 --- a/radio/src/storage/conversions/yaml/yaml_datastructs_x12s.cpp +++ b/radio/src/storage/conversions/yaml/yaml_datastructs_x12s.cpp @@ -378,6 +378,7 @@ static const struct YamlNode struct_OpenTxTheme__PersistentData[] = { }; static const struct YamlNode struct_RadioData[] = { YAML_UNSIGNED( "version", 8 ), + YAML_CUSTOM("board",nullptr,w_board), YAML_PADDING( 16 ), YAML_ARRAY("calib", 48, 15, struct_CalibData, NULL), YAML_PADDING( 16 ), @@ -411,7 +412,7 @@ static const struct YamlNode struct_RadioData[] = { YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ), YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ), YAML_UNSIGNED( "gpsFormat", 1 ), - YAML_UNSIGNED( "unexpectedShutdown", 1 ), + YAML_PADDING( 1 ), YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ), YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ), YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ), diff --git a/radio/src/storage/conversions/yaml/yaml_datastructs_x7.cpp b/radio/src/storage/conversions/yaml/yaml_datastructs_x7.cpp index 6fa0070ef..34add024b 100644 --- a/radio/src/storage/conversions/yaml/yaml_datastructs_x7.cpp +++ b/radio/src/storage/conversions/yaml/yaml_datastructs_x7.cpp @@ -328,6 +328,7 @@ static const struct YamlNode struct_string_24[] = { }; static const struct YamlNode struct_RadioData[] = { YAML_UNSIGNED( "version", 8 ), + YAML_CUSTOM("board",nullptr,w_board), YAML_PADDING( 16 ), YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL), YAML_PADDING( 16 ), @@ -363,7 +364,7 @@ static const struct YamlNode struct_RadioData[] = { YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ), YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ), YAML_UNSIGNED( "gpsFormat", 1 ), - YAML_UNSIGNED( "unexpectedShutdown", 1 ), + YAML_PADDING( 1 ), YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ), YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ), YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ), diff --git a/radio/src/storage/conversions/yaml/yaml_datastructs_x9d.cpp b/radio/src/storage/conversions/yaml/yaml_datastructs_x9d.cpp index cc7bde834..3bb475d99 100644 --- a/radio/src/storage/conversions/yaml/yaml_datastructs_x9d.cpp +++ b/radio/src/storage/conversions/yaml/yaml_datastructs_x9d.cpp @@ -335,6 +335,7 @@ static const struct YamlNode struct_string_24[] = { }; static const struct YamlNode struct_RadioData[] = { YAML_UNSIGNED( "version", 8 ), + YAML_CUSTOM("board",nullptr,w_board), YAML_PADDING( 16 ), YAML_ARRAY("calib", 48, 9, struct_CalibData, NULL), YAML_PADDING( 16 ), @@ -370,7 +371,7 @@ static const struct YamlNode struct_RadioData[] = { YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ), YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ), YAML_UNSIGNED( "gpsFormat", 1 ), - YAML_UNSIGNED( "unexpectedShutdown", 1 ), + YAML_PADDING( 1 ), YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ), YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ), YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ), diff --git a/radio/src/storage/conversions/yaml/yaml_datastructs_x9e.cpp b/radio/src/storage/conversions/yaml/yaml_datastructs_x9e.cpp index 3b0533b24..8e7bad62a 100644 --- a/radio/src/storage/conversions/yaml/yaml_datastructs_x9e.cpp +++ b/radio/src/storage/conversions/yaml/yaml_datastructs_x9e.cpp @@ -374,6 +374,7 @@ static const struct YamlNode struct_string_24[] = { }; static const struct YamlNode struct_RadioData[] = { YAML_UNSIGNED( "version", 8 ), + YAML_CUSTOM("board",nullptr,w_board), YAML_PADDING( 16 ), YAML_ARRAY("calib", 48, 12, struct_CalibData, NULL), YAML_PADDING( 16 ), @@ -409,7 +410,7 @@ static const struct YamlNode struct_RadioData[] = { YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ), YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ), YAML_UNSIGNED( "gpsFormat", 1 ), - YAML_UNSIGNED( "unexpectedShutdown", 1 ), + YAML_PADDING( 1 ), YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ), YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ), YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ), diff --git a/radio/src/storage/conversions/yaml/yaml_datastructs_x9lite.cpp b/radio/src/storage/conversions/yaml/yaml_datastructs_x9lite.cpp index 6c80e26d0..cfe00a6d1 100644 --- a/radio/src/storage/conversions/yaml/yaml_datastructs_x9lite.cpp +++ b/radio/src/storage/conversions/yaml/yaml_datastructs_x9lite.cpp @@ -315,6 +315,7 @@ static const struct YamlNode struct_string_24[] = { }; static const struct YamlNode struct_RadioData[] = { YAML_UNSIGNED( "version", 8 ), + YAML_CUSTOM("board",nullptr,w_board), YAML_PADDING( 16 ), YAML_ARRAY("calib", 48, 5, struct_CalibData, NULL), YAML_PADDING( 16 ), @@ -350,7 +351,7 @@ static const struct YamlNode struct_RadioData[] = { YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ), YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ), YAML_UNSIGNED( "gpsFormat", 1 ), - YAML_UNSIGNED( "unexpectedShutdown", 1 ), + YAML_PADDING( 1 ), YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ), YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ), YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ), diff --git a/radio/src/storage/conversions/yaml/yaml_datastructs_x9lites.cpp b/radio/src/storage/conversions/yaml/yaml_datastructs_x9lites.cpp index c07bf178b..e0aaeba99 100644 --- a/radio/src/storage/conversions/yaml/yaml_datastructs_x9lites.cpp +++ b/radio/src/storage/conversions/yaml/yaml_datastructs_x9lites.cpp @@ -323,6 +323,7 @@ static const struct YamlNode struct_string_24[] = { }; static const struct YamlNode struct_RadioData[] = { YAML_UNSIGNED( "version", 8 ), + YAML_CUSTOM("board",nullptr,w_board), YAML_PADDING( 16 ), YAML_ARRAY("calib", 48, 5, struct_CalibData, NULL), YAML_PADDING( 16 ), @@ -358,7 +359,7 @@ static const struct YamlNode struct_RadioData[] = { YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ), YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ), YAML_UNSIGNED( "gpsFormat", 1 ), - YAML_UNSIGNED( "unexpectedShutdown", 1 ), + YAML_PADDING( 1 ), YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ), YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ), YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ), diff --git a/radio/src/storage/conversions/yaml/yaml_datastructs_xlite.cpp b/radio/src/storage/conversions/yaml/yaml_datastructs_xlite.cpp index eb8e383a1..f579825bb 100644 --- a/radio/src/storage/conversions/yaml/yaml_datastructs_xlite.cpp +++ b/radio/src/storage/conversions/yaml/yaml_datastructs_xlite.cpp @@ -320,6 +320,7 @@ static const struct YamlNode struct_string_24[] = { }; static const struct YamlNode struct_RadioData[] = { YAML_UNSIGNED( "version", 8 ), + YAML_CUSTOM("board",nullptr,w_board), YAML_PADDING( 16 ), YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL), YAML_PADDING( 16 ), @@ -355,7 +356,7 @@ static const struct YamlNode struct_RadioData[] = { YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ), YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ), YAML_UNSIGNED( "gpsFormat", 1 ), - YAML_UNSIGNED( "unexpectedShutdown", 1 ), + YAML_PADDING( 1 ), YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ), YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ), YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ), diff --git a/radio/src/storage/conversions/yaml/yaml_datastructs_xlites.cpp b/radio/src/storage/conversions/yaml/yaml_datastructs_xlites.cpp index fdbfae806..761e32c11 100644 --- a/radio/src/storage/conversions/yaml/yaml_datastructs_xlites.cpp +++ b/radio/src/storage/conversions/yaml/yaml_datastructs_xlites.cpp @@ -322,6 +322,7 @@ static const struct YamlNode struct_string_24[] = { }; static const struct YamlNode struct_RadioData[] = { YAML_UNSIGNED( "version", 8 ), + YAML_CUSTOM("board",nullptr,w_board), YAML_PADDING( 16 ), YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL), YAML_PADDING( 16 ), @@ -357,7 +358,7 @@ static const struct YamlNode struct_RadioData[] = { YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ), YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ), YAML_UNSIGNED( "gpsFormat", 1 ), - YAML_UNSIGNED( "unexpectedShutdown", 1 ), + YAML_PADDING( 1 ), YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ), YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ), YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ), diff --git a/radio/src/storage/yaml/yaml_datastructs_funcs.cpp b/radio/src/storage/yaml/yaml_datastructs_funcs.cpp index 4774f437e..5d4922497 100644 --- a/radio/src/storage/yaml/yaml_datastructs_funcs.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_funcs.cpp @@ -28,6 +28,8 @@ // Use definitions from v220 conversions as long as nothing changes namespace yaml_conv_220 { + bool w_board(void* user, uint8_t* data, uint32_t bitoffs, yaml_writer_func wf, void* opaque); + bool in_write_weight(const YamlNode* node, uint32_t val, yaml_writer_func wf, void* opaque); bool output_source_1_param(const char* src_prefix, size_t src_len, uint32_t n, @@ -135,6 +137,12 @@ static inline void check_yaml_funcs() #endif } +static bool w_board(void* user, uint8_t* data, uint32_t bitoffs, + yaml_writer_func wf, void* opaque) +{ + return yaml_conv_220::w_board(user, data, bitoffs, wf, opaque); +} + #define GVAR_SMALL 128 static uint32_t in_read_weight(const YamlNode* node, const char* val, uint8_t val_len) diff --git a/radio/src/storage/yaml/yaml_datastructs_nv14.cpp b/radio/src/storage/yaml/yaml_datastructs_nv14.cpp index 71e0dc879..33c9ffe3c 100644 --- a/radio/src/storage/yaml/yaml_datastructs_nv14.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_nv14.cpp @@ -357,6 +357,7 @@ static const struct YamlNode struct_OpenTxTheme__PersistentData[] = { }; static const struct YamlNode struct_RadioData[] = { YAML_UNSIGNED( "version", 8 ), + YAML_CUSTOM("board",nullptr,w_board), YAML_PADDING( 16 ), YAML_ARRAY("calib", 48, 9, struct_CalibData, NULL), YAML_PADDING( 16 ), @@ -390,12 +391,10 @@ static const struct YamlNode struct_RadioData[] = { YAML_UNSIGNED( "templateSetup", 8 ), YAML_SIGNED( "PPM_Multiplier", 8 ), YAML_SIGNED_CUST( "hapticLength", 8, r_5pos, w_5pos ), - YAML_PADDING( 8 ), - YAML_UNSIGNED( "stickReverse", 8 ), YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ), YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ), YAML_UNSIGNED( "gpsFormat", 1 ), - YAML_UNSIGNED( "unexpectedShutdown", 1 ), + YAML_PADDING( 1 ), YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ), YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ), YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ), diff --git a/radio/src/storage/yaml/yaml_datastructs_t12.cpp b/radio/src/storage/yaml/yaml_datastructs_t12.cpp index 218804cb1..4ddcadc24 100644 --- a/radio/src/storage/yaml/yaml_datastructs_t12.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_t12.cpp @@ -328,6 +328,7 @@ static const struct YamlNode struct_string_24[] = { }; static const struct YamlNode struct_RadioData[] = { YAML_UNSIGNED( "version", 8 ), + YAML_CUSTOM("board",nullptr,w_board), YAML_PADDING( 16 ), YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL), YAML_PADDING( 16 ), @@ -364,7 +365,7 @@ static const struct YamlNode struct_RadioData[] = { YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ), YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ), YAML_UNSIGNED( "gpsFormat", 1 ), - YAML_UNSIGNED( "unexpectedShutdown", 1 ), + YAML_PADDING( 1 ), YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ), YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ), YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ), diff --git a/radio/src/storage/yaml/yaml_datastructs_t8.cpp b/radio/src/storage/yaml/yaml_datastructs_t8.cpp index c364bb3aa..becdd13c4 100644 --- a/radio/src/storage/yaml/yaml_datastructs_t8.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_t8.cpp @@ -328,6 +328,7 @@ static const struct YamlNode struct_string_24[] = { }; static const struct YamlNode struct_RadioData[] = { YAML_UNSIGNED( "version", 8 ), + YAML_CUSTOM("board",nullptr,w_board), YAML_PADDING( 16 ), YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL), YAML_PADDING( 16 ), @@ -364,7 +365,7 @@ static const struct YamlNode struct_RadioData[] = { YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ), YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ), YAML_UNSIGNED( "gpsFormat", 1 ), - YAML_UNSIGNED( "unexpectedShutdown", 1 ), + YAML_PADDING( 1 ), YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ), YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ), YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ), diff --git a/radio/src/storage/yaml/yaml_datastructs_tlite.cpp b/radio/src/storage/yaml/yaml_datastructs_tlite.cpp index c364bb3aa..becdd13c4 100644 --- a/radio/src/storage/yaml/yaml_datastructs_tlite.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_tlite.cpp @@ -328,6 +328,7 @@ static const struct YamlNode struct_string_24[] = { }; static const struct YamlNode struct_RadioData[] = { YAML_UNSIGNED( "version", 8 ), + YAML_CUSTOM("board",nullptr,w_board), YAML_PADDING( 16 ), YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL), YAML_PADDING( 16 ), @@ -364,7 +365,7 @@ static const struct YamlNode struct_RadioData[] = { YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ), YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ), YAML_UNSIGNED( "gpsFormat", 1 ), - YAML_UNSIGNED( "unexpectedShutdown", 1 ), + YAML_PADDING( 1 ), YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ), YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ), YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ), diff --git a/radio/src/storage/yaml/yaml_datastructs_tx12.cpp b/radio/src/storage/yaml/yaml_datastructs_tx12.cpp index 68e5bdf06..cb33916c6 100644 --- a/radio/src/storage/yaml/yaml_datastructs_tx12.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_tx12.cpp @@ -328,6 +328,7 @@ static const struct YamlNode struct_string_24[] = { }; static const struct YamlNode struct_RadioData[] = { YAML_UNSIGNED( "version", 8 ), + YAML_CUSTOM("board",nullptr,w_board), YAML_PADDING( 16 ), YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL), YAML_PADDING( 16 ), @@ -364,7 +365,7 @@ static const struct YamlNode struct_RadioData[] = { YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ), YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ), YAML_UNSIGNED( "gpsFormat", 1 ), - YAML_UNSIGNED( "unexpectedShutdown", 1 ), + YAML_PADDING( 1 ), YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ), YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ), YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ), diff --git a/radio/src/storage/yaml/yaml_datastructs_x10.cpp b/radio/src/storage/yaml/yaml_datastructs_x10.cpp index 026ea7d1f..5bf3dbaa9 100644 --- a/radio/src/storage/yaml/yaml_datastructs_x10.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_x10.cpp @@ -380,6 +380,7 @@ static const struct YamlNode struct_OpenTxTheme__PersistentData[] = { }; static const struct YamlNode struct_RadioData[] = { YAML_UNSIGNED( "version", 8 ), + YAML_CUSTOM("board",nullptr,w_board), YAML_PADDING( 16 ), YAML_ARRAY("calib", 48, 17, struct_CalibData, NULL), YAML_PADDING( 16 ), @@ -414,7 +415,7 @@ static const struct YamlNode struct_RadioData[] = { YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ), YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ), YAML_UNSIGNED( "gpsFormat", 1 ), - YAML_UNSIGNED( "unexpectedShutdown", 1 ), + YAML_PADDING( 1 ), YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ), YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ), YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ), diff --git a/radio/src/storage/yaml/yaml_datastructs_x12s.cpp b/radio/src/storage/yaml/yaml_datastructs_x12s.cpp index 0c81b1704..b3417d332 100644 --- a/radio/src/storage/yaml/yaml_datastructs_x12s.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_x12s.cpp @@ -378,6 +378,7 @@ static const struct YamlNode struct_OpenTxTheme__PersistentData[] = { }; static const struct YamlNode struct_RadioData[] = { YAML_UNSIGNED( "version", 8 ), + YAML_CUSTOM("board",nullptr,w_board), YAML_PADDING( 16 ), YAML_ARRAY("calib", 48, 15, struct_CalibData, NULL), YAML_PADDING( 16 ), @@ -412,7 +413,7 @@ static const struct YamlNode struct_RadioData[] = { YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ), YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ), YAML_UNSIGNED( "gpsFormat", 1 ), - YAML_UNSIGNED( "unexpectedShutdown", 1 ), + YAML_PADDING( 1 ), YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ), YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ), YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ), diff --git a/radio/src/storage/yaml/yaml_datastructs_x7.cpp b/radio/src/storage/yaml/yaml_datastructs_x7.cpp index c364bb3aa..becdd13c4 100644 --- a/radio/src/storage/yaml/yaml_datastructs_x7.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_x7.cpp @@ -328,6 +328,7 @@ static const struct YamlNode struct_string_24[] = { }; static const struct YamlNode struct_RadioData[] = { YAML_UNSIGNED( "version", 8 ), + YAML_CUSTOM("board",nullptr,w_board), YAML_PADDING( 16 ), YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL), YAML_PADDING( 16 ), @@ -364,7 +365,7 @@ static const struct YamlNode struct_RadioData[] = { YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ), YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ), YAML_UNSIGNED( "gpsFormat", 1 ), - YAML_UNSIGNED( "unexpectedShutdown", 1 ), + YAML_PADDING( 1 ), YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ), YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ), YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ), diff --git a/radio/src/storage/yaml/yaml_datastructs_x9d.cpp b/radio/src/storage/yaml/yaml_datastructs_x9d.cpp index 43b797e14..831f68c5a 100644 --- a/radio/src/storage/yaml/yaml_datastructs_x9d.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_x9d.cpp @@ -335,6 +335,7 @@ static const struct YamlNode struct_string_24[] = { }; static const struct YamlNode struct_RadioData[] = { YAML_UNSIGNED( "version", 8 ), + YAML_CUSTOM("board",nullptr,w_board), YAML_PADDING( 16 ), YAML_ARRAY("calib", 48, 9, struct_CalibData, NULL), YAML_PADDING( 16 ), @@ -371,7 +372,7 @@ static const struct YamlNode struct_RadioData[] = { YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ), YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ), YAML_UNSIGNED( "gpsFormat", 1 ), - YAML_UNSIGNED( "unexpectedShutdown", 1 ), + YAML_PADDING( 1 ), YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ), YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ), YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ), diff --git a/radio/src/storage/yaml/yaml_datastructs_x9e.cpp b/radio/src/storage/yaml/yaml_datastructs_x9e.cpp index 0488418f1..22f18fd9d 100644 --- a/radio/src/storage/yaml/yaml_datastructs_x9e.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_x9e.cpp @@ -374,6 +374,7 @@ static const struct YamlNode struct_string_24[] = { }; static const struct YamlNode struct_RadioData[] = { YAML_UNSIGNED( "version", 8 ), + YAML_CUSTOM("board",nullptr,w_board), YAML_PADDING( 16 ), YAML_ARRAY("calib", 48, 12, struct_CalibData, NULL), YAML_PADDING( 16 ), @@ -410,7 +411,7 @@ static const struct YamlNode struct_RadioData[] = { YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ), YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ), YAML_UNSIGNED( "gpsFormat", 1 ), - YAML_UNSIGNED( "unexpectedShutdown", 1 ), + YAML_PADDING( 1 ), YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ), YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ), YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ), diff --git a/radio/src/storage/yaml/yaml_datastructs_x9lite.cpp b/radio/src/storage/yaml/yaml_datastructs_x9lite.cpp index 10faef18a..0a7d205a0 100644 --- a/radio/src/storage/yaml/yaml_datastructs_x9lite.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_x9lite.cpp @@ -315,6 +315,7 @@ static const struct YamlNode struct_string_24[] = { }; static const struct YamlNode struct_RadioData[] = { YAML_UNSIGNED( "version", 8 ), + YAML_CUSTOM("board",nullptr,w_board), YAML_PADDING( 16 ), YAML_ARRAY("calib", 48, 5, struct_CalibData, NULL), YAML_PADDING( 16 ), @@ -351,7 +352,7 @@ static const struct YamlNode struct_RadioData[] = { YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ), YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ), YAML_UNSIGNED( "gpsFormat", 1 ), - YAML_UNSIGNED( "unexpectedShutdown", 1 ), + YAML_PADDING( 1 ), YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ), YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ), YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ), diff --git a/radio/src/storage/yaml/yaml_datastructs_x9lites.cpp b/radio/src/storage/yaml/yaml_datastructs_x9lites.cpp index d1b807e11..4db4cf1f3 100644 --- a/radio/src/storage/yaml/yaml_datastructs_x9lites.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_x9lites.cpp @@ -323,6 +323,7 @@ static const struct YamlNode struct_string_24[] = { }; static const struct YamlNode struct_RadioData[] = { YAML_UNSIGNED( "version", 8 ), + YAML_CUSTOM("board",nullptr,w_board), YAML_PADDING( 16 ), YAML_ARRAY("calib", 48, 5, struct_CalibData, NULL), YAML_PADDING( 16 ), @@ -359,7 +360,7 @@ static const struct YamlNode struct_RadioData[] = { YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ), YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ), YAML_UNSIGNED( "gpsFormat", 1 ), - YAML_UNSIGNED( "unexpectedShutdown", 1 ), + YAML_PADDING( 1 ), YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ), YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ), YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ), diff --git a/radio/src/storage/yaml/yaml_datastructs_xlite.cpp b/radio/src/storage/yaml/yaml_datastructs_xlite.cpp index f42fab1a3..b591daf19 100644 --- a/radio/src/storage/yaml/yaml_datastructs_xlite.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_xlite.cpp @@ -320,6 +320,7 @@ static const struct YamlNode struct_string_24[] = { }; static const struct YamlNode struct_RadioData[] = { YAML_UNSIGNED( "version", 8 ), + YAML_CUSTOM("board",nullptr,w_board), YAML_PADDING( 16 ), YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL), YAML_PADDING( 16 ), @@ -356,7 +357,7 @@ static const struct YamlNode struct_RadioData[] = { YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ), YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ), YAML_UNSIGNED( "gpsFormat", 1 ), - YAML_UNSIGNED( "unexpectedShutdown", 1 ), + YAML_PADDING( 1 ), YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ), YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ), YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ), diff --git a/radio/src/storage/yaml/yaml_datastructs_xlites.cpp b/radio/src/storage/yaml/yaml_datastructs_xlites.cpp index f7dabf4da..828436b96 100644 --- a/radio/src/storage/yaml/yaml_datastructs_xlites.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_xlites.cpp @@ -322,6 +322,7 @@ static const struct YamlNode struct_string_24[] = { }; static const struct YamlNode struct_RadioData[] = { YAML_UNSIGNED( "version", 8 ), + YAML_CUSTOM("board",nullptr,w_board), YAML_PADDING( 16 ), YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL), YAML_PADDING( 16 ), @@ -358,7 +359,7 @@ static const struct YamlNode struct_RadioData[] = { YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ), YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ), YAML_UNSIGNED( "gpsFormat", 1 ), - YAML_UNSIGNED( "unexpectedShutdown", 1 ), + YAML_PADDING( 1 ), YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ), YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ), YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ),