diff --git a/radio/src/dataconstants.h b/radio/src/dataconstants.h index 356fc20f8..e24a035c6 100644 --- a/radio/src/dataconstants.h +++ b/radio/src/dataconstants.h @@ -240,10 +240,9 @@ enum TrainerMode { #endif enum UartModes { -#if defined(CLI) || defined(DEBUG) - UART_MODE_DEBUG, -#else UART_MODE_NONE, +#if defined(CLI) || defined(DEBUG) + UART_MODE_DEBUG SKIP = UART_MODE_NONE, #endif UART_MODE_TELEMETRY_MIRROR, UART_MODE_TELEMETRY, diff --git a/radio/src/datastructs_private.h b/radio/src/datastructs_private.h index 99775f4d7..27dbb47e8 100644 --- a/radio/src/datastructs_private.h +++ b/radio/src/datastructs_private.h @@ -111,10 +111,10 @@ PACK(struct ExpoData { */ PACK(struct LimitData { - int32_t min:11; - int32_t max:11; + int32_t min:11 CUST(in_read_weight,in_write_weight); + int32_t max:11 CUST(in_read_weight,in_write_weight); int32_t ppmCenter:10; // TODO can be reduced to 8 bits - int16_t offset:11; + int16_t offset:11 CUST(in_read_weight,in_write_weight); uint16_t symetrical:1; uint16_t revert:1; uint16_t spare:3 SKIP; diff --git a/radio/src/storage/conversions/yaml/yaml_datastructs_nv14.cpp b/radio/src/storage/conversions/yaml/yaml_datastructs_nv14.cpp index 254c4a604..4936c811a 100644 --- a/radio/src/storage/conversions/yaml/yaml_datastructs_nv14.cpp +++ b/radio/src/storage/conversions/yaml/yaml_datastructs_nv14.cpp @@ -490,10 +490,10 @@ static const struct YamlNode struct_MixData[] = { }; static const struct YamlNode struct_LimitData[] = { YAML_IDX, - YAML_SIGNED( "min", 11 ), - YAML_SIGNED( "max", 11 ), + YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ), + YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ), YAML_SIGNED( "ppmCenter", 10 ), - YAML_SIGNED( "offset", 11 ), + YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ), YAML_UNSIGNED( "symetrical", 1 ), YAML_UNSIGNED( "revert", 1 ), YAML_PADDING( 3 ), diff --git a/radio/src/storage/conversions/yaml/yaml_datastructs_t12.cpp b/radio/src/storage/conversions/yaml/yaml_datastructs_t12.cpp index 9aec3504d..d065a249e 100644 --- a/radio/src/storage/conversions/yaml/yaml_datastructs_t12.cpp +++ b/radio/src/storage/conversions/yaml/yaml_datastructs_t12.cpp @@ -455,10 +455,10 @@ static const struct YamlNode struct_MixData[] = { }; static const struct YamlNode struct_LimitData[] = { YAML_IDX, - YAML_SIGNED( "min", 11 ), - YAML_SIGNED( "max", 11 ), + YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ), + YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ), YAML_SIGNED( "ppmCenter", 10 ), - YAML_SIGNED( "offset", 11 ), + YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ), YAML_UNSIGNED( "symetrical", 1 ), YAML_UNSIGNED( "revert", 1 ), YAML_PADDING( 3 ), diff --git a/radio/src/storage/conversions/yaml/yaml_datastructs_t8.cpp b/radio/src/storage/conversions/yaml/yaml_datastructs_t8.cpp index 4d7211cb3..43b07da31 100644 --- a/radio/src/storage/conversions/yaml/yaml_datastructs_t8.cpp +++ b/radio/src/storage/conversions/yaml/yaml_datastructs_t8.cpp @@ -455,10 +455,10 @@ static const struct YamlNode struct_MixData[] = { }; static const struct YamlNode struct_LimitData[] = { YAML_IDX, - YAML_SIGNED( "min", 11 ), - YAML_SIGNED( "max", 11 ), + YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ), + YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ), YAML_SIGNED( "ppmCenter", 10 ), - YAML_SIGNED( "offset", 11 ), + YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ), YAML_UNSIGNED( "symetrical", 1 ), YAML_UNSIGNED( "revert", 1 ), YAML_PADDING( 3 ), diff --git a/radio/src/storage/conversions/yaml/yaml_datastructs_tlite.cpp b/radio/src/storage/conversions/yaml/yaml_datastructs_tlite.cpp index 4d7211cb3..43b07da31 100644 --- a/radio/src/storage/conversions/yaml/yaml_datastructs_tlite.cpp +++ b/radio/src/storage/conversions/yaml/yaml_datastructs_tlite.cpp @@ -455,10 +455,10 @@ static const struct YamlNode struct_MixData[] = { }; static const struct YamlNode struct_LimitData[] = { YAML_IDX, - YAML_SIGNED( "min", 11 ), - YAML_SIGNED( "max", 11 ), + YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ), + YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ), YAML_SIGNED( "ppmCenter", 10 ), - YAML_SIGNED( "offset", 11 ), + YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ), YAML_UNSIGNED( "symetrical", 1 ), YAML_UNSIGNED( "revert", 1 ), YAML_PADDING( 3 ), diff --git a/radio/src/storage/conversions/yaml/yaml_datastructs_tx12.cpp b/radio/src/storage/conversions/yaml/yaml_datastructs_tx12.cpp index 255ff3dec..09608077f 100644 --- a/radio/src/storage/conversions/yaml/yaml_datastructs_tx12.cpp +++ b/radio/src/storage/conversions/yaml/yaml_datastructs_tx12.cpp @@ -455,10 +455,10 @@ static const struct YamlNode struct_MixData[] = { }; static const struct YamlNode struct_LimitData[] = { YAML_IDX, - YAML_SIGNED( "min", 11 ), - YAML_SIGNED( "max", 11 ), + YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ), + YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ), YAML_SIGNED( "ppmCenter", 10 ), - YAML_SIGNED( "offset", 11 ), + YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ), YAML_UNSIGNED( "symetrical", 1 ), YAML_UNSIGNED( "revert", 1 ), YAML_PADDING( 3 ), diff --git a/radio/src/storage/conversions/yaml/yaml_datastructs_x10.cpp b/radio/src/storage/conversions/yaml/yaml_datastructs_x10.cpp index c19cf30ab..0e95111d0 100644 --- a/radio/src/storage/conversions/yaml/yaml_datastructs_x10.cpp +++ b/radio/src/storage/conversions/yaml/yaml_datastructs_x10.cpp @@ -507,10 +507,10 @@ static const struct YamlNode struct_MixData[] = { }; static const struct YamlNode struct_LimitData[] = { YAML_IDX, - YAML_SIGNED( "min", 11 ), - YAML_SIGNED( "max", 11 ), + YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ), + YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ), YAML_SIGNED( "ppmCenter", 10 ), - YAML_SIGNED( "offset", 11 ), + YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ), YAML_UNSIGNED( "symetrical", 1 ), YAML_UNSIGNED( "revert", 1 ), YAML_PADDING( 3 ), diff --git a/radio/src/storage/conversions/yaml/yaml_datastructs_x12s.cpp b/radio/src/storage/conversions/yaml/yaml_datastructs_x12s.cpp index e9080a1eb..1e0fd3c3c 100644 --- a/radio/src/storage/conversions/yaml/yaml_datastructs_x12s.cpp +++ b/radio/src/storage/conversions/yaml/yaml_datastructs_x12s.cpp @@ -507,10 +507,10 @@ static const struct YamlNode struct_MixData[] = { }; static const struct YamlNode struct_LimitData[] = { YAML_IDX, - YAML_SIGNED( "min", 11 ), - YAML_SIGNED( "max", 11 ), + YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ), + YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ), YAML_SIGNED( "ppmCenter", 10 ), - YAML_SIGNED( "offset", 11 ), + YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ), YAML_UNSIGNED( "symetrical", 1 ), YAML_UNSIGNED( "revert", 1 ), YAML_PADDING( 3 ), diff --git a/radio/src/storage/conversions/yaml/yaml_datastructs_x7.cpp b/radio/src/storage/conversions/yaml/yaml_datastructs_x7.cpp index 4d7211cb3..43b07da31 100644 --- a/radio/src/storage/conversions/yaml/yaml_datastructs_x7.cpp +++ b/radio/src/storage/conversions/yaml/yaml_datastructs_x7.cpp @@ -455,10 +455,10 @@ static const struct YamlNode struct_MixData[] = { }; static const struct YamlNode struct_LimitData[] = { YAML_IDX, - YAML_SIGNED( "min", 11 ), - YAML_SIGNED( "max", 11 ), + YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ), + YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ), YAML_SIGNED( "ppmCenter", 10 ), - YAML_SIGNED( "offset", 11 ), + YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ), YAML_UNSIGNED( "symetrical", 1 ), YAML_UNSIGNED( "revert", 1 ), YAML_PADDING( 3 ), diff --git a/radio/src/storage/conversions/yaml/yaml_datastructs_x9d.cpp b/radio/src/storage/conversions/yaml/yaml_datastructs_x9d.cpp index 65038c815..5445b5043 100644 --- a/radio/src/storage/conversions/yaml/yaml_datastructs_x9d.cpp +++ b/radio/src/storage/conversions/yaml/yaml_datastructs_x9d.cpp @@ -463,10 +463,10 @@ static const struct YamlNode struct_MixData[] = { }; static const struct YamlNode struct_LimitData[] = { YAML_IDX, - YAML_SIGNED( "min", 11 ), - YAML_SIGNED( "max", 11 ), + YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ), + YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ), YAML_SIGNED( "ppmCenter", 10 ), - YAML_SIGNED( "offset", 11 ), + YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ), YAML_UNSIGNED( "symetrical", 1 ), YAML_UNSIGNED( "revert", 1 ), YAML_PADDING( 3 ), diff --git a/radio/src/storage/conversions/yaml/yaml_datastructs_x9e.cpp b/radio/src/storage/conversions/yaml/yaml_datastructs_x9e.cpp index be3b6c6cb..ae5bf6bda 100644 --- a/radio/src/storage/conversions/yaml/yaml_datastructs_x9e.cpp +++ b/radio/src/storage/conversions/yaml/yaml_datastructs_x9e.cpp @@ -502,10 +502,10 @@ static const struct YamlNode struct_MixData[] = { }; static const struct YamlNode struct_LimitData[] = { YAML_IDX, - YAML_SIGNED( "min", 11 ), - YAML_SIGNED( "max", 11 ), + YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ), + YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ), YAML_SIGNED( "ppmCenter", 10 ), - YAML_SIGNED( "offset", 11 ), + YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ), YAML_UNSIGNED( "symetrical", 1 ), YAML_UNSIGNED( "revert", 1 ), YAML_PADDING( 3 ), diff --git a/radio/src/storage/conversions/yaml/yaml_datastructs_x9lite.cpp b/radio/src/storage/conversions/yaml/yaml_datastructs_x9lite.cpp index 63cf15877..a8ea493b9 100644 --- a/radio/src/storage/conversions/yaml/yaml_datastructs_x9lite.cpp +++ b/radio/src/storage/conversions/yaml/yaml_datastructs_x9lite.cpp @@ -440,10 +440,10 @@ static const struct YamlNode struct_MixData[] = { }; static const struct YamlNode struct_LimitData[] = { YAML_IDX, - YAML_SIGNED( "min", 11 ), - YAML_SIGNED( "max", 11 ), + YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ), + YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ), YAML_SIGNED( "ppmCenter", 10 ), - YAML_SIGNED( "offset", 11 ), + YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ), YAML_UNSIGNED( "symetrical", 1 ), YAML_UNSIGNED( "revert", 1 ), YAML_PADDING( 3 ), diff --git a/radio/src/storage/conversions/yaml/yaml_datastructs_x9lites.cpp b/radio/src/storage/conversions/yaml/yaml_datastructs_x9lites.cpp index 7acca6e5c..1cda4c30a 100644 --- a/radio/src/storage/conversions/yaml/yaml_datastructs_x9lites.cpp +++ b/radio/src/storage/conversions/yaml/yaml_datastructs_x9lites.cpp @@ -450,10 +450,10 @@ static const struct YamlNode struct_MixData[] = { }; static const struct YamlNode struct_LimitData[] = { YAML_IDX, - YAML_SIGNED( "min", 11 ), - YAML_SIGNED( "max", 11 ), + YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ), + YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ), YAML_SIGNED( "ppmCenter", 10 ), - YAML_SIGNED( "offset", 11 ), + YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ), YAML_UNSIGNED( "symetrical", 1 ), YAML_UNSIGNED( "revert", 1 ), YAML_PADDING( 3 ), diff --git a/radio/src/storage/conversions/yaml/yaml_datastructs_xlite.cpp b/radio/src/storage/conversions/yaml/yaml_datastructs_xlite.cpp index e0f1a8c2f..6ced4bee2 100644 --- a/radio/src/storage/conversions/yaml/yaml_datastructs_xlite.cpp +++ b/radio/src/storage/conversions/yaml/yaml_datastructs_xlite.cpp @@ -447,10 +447,10 @@ static const struct YamlNode struct_MixData[] = { }; static const struct YamlNode struct_LimitData[] = { YAML_IDX, - YAML_SIGNED( "min", 11 ), - YAML_SIGNED( "max", 11 ), + YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ), + YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ), YAML_SIGNED( "ppmCenter", 10 ), - YAML_SIGNED( "offset", 11 ), + YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ), YAML_UNSIGNED( "symetrical", 1 ), YAML_UNSIGNED( "revert", 1 ), YAML_PADDING( 3 ), diff --git a/radio/src/storage/conversions/yaml/yaml_datastructs_xlites.cpp b/radio/src/storage/conversions/yaml/yaml_datastructs_xlites.cpp index 5a8978845..424cdee76 100644 --- a/radio/src/storage/conversions/yaml/yaml_datastructs_xlites.cpp +++ b/radio/src/storage/conversions/yaml/yaml_datastructs_xlites.cpp @@ -451,10 +451,10 @@ static const struct YamlNode struct_MixData[] = { }; static const struct YamlNode struct_LimitData[] = { YAML_IDX, - YAML_SIGNED( "min", 11 ), - YAML_SIGNED( "max", 11 ), + YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ), + YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ), YAML_SIGNED( "ppmCenter", 10 ), - YAML_SIGNED( "offset", 11 ), + YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ), YAML_UNSIGNED( "symetrical", 1 ), YAML_UNSIGNED( "revert", 1 ), YAML_PADDING( 3 ), diff --git a/radio/src/storage/conversions/yaml/yaml_datastructs_zorro.cpp b/radio/src/storage/conversions/yaml/yaml_datastructs_zorro.cpp index 37ab5895d..f3eedf17f 100644 --- a/radio/src/storage/conversions/yaml/yaml_datastructs_zorro.cpp +++ b/radio/src/storage/conversions/yaml/yaml_datastructs_zorro.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 ), @@ -441,7 +442,7 @@ static const struct YamlNode struct_MixData[] = { YAML_UNSIGNED( "mixWarn", 2 ), YAML_ENUM("mltpx", 2, enum_MixerMultiplex), YAML_PADDING( 1 ), - YAML_SIGNED( "offset", 14 ), + YAML_SIGNED_CUST( "offset", 14, in_read_weight, in_write_weight ), YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ), YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ), YAML_STRUCT("curve", 16, struct_CurveRef, NULL), @@ -454,10 +455,10 @@ static const struct YamlNode struct_MixData[] = { }; static const struct YamlNode struct_LimitData[] = { YAML_IDX, - YAML_SIGNED( "min", 11 ), - YAML_SIGNED( "max", 11 ), + YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ), + YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ), YAML_SIGNED( "ppmCenter", 10 ), - YAML_SIGNED( "offset", 11 ), + YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ), YAML_UNSIGNED( "symetrical", 1 ), YAML_UNSIGNED( "revert", 1 ), YAML_PADDING( 3 ), @@ -476,7 +477,7 @@ static const struct YamlNode struct_ExpoData[] = { YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ), YAML_PADDING( 1 ), YAML_STRING("name", 6), - YAML_SIGNED( "offset", 8 ), + YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ), YAML_STRUCT("curve", 16, struct_CurveRef, NULL), YAML_END }; diff --git a/radio/src/storage/yaml/yaml_datastructs_nv14.cpp b/radio/src/storage/yaml/yaml_datastructs_nv14.cpp index d3ad55534..1f82453b4 100644 --- a/radio/src/storage/yaml/yaml_datastructs_nv14.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_nv14.cpp @@ -489,10 +489,10 @@ static const struct YamlNode struct_MixData[] = { }; static const struct YamlNode struct_LimitData[] = { YAML_IDX, - YAML_SIGNED( "min", 11 ), - YAML_SIGNED( "max", 11 ), + YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ), + YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ), YAML_SIGNED( "ppmCenter", 10 ), - YAML_SIGNED( "offset", 11 ), + YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ), YAML_UNSIGNED( "symetrical", 1 ), YAML_UNSIGNED( "revert", 1 ), YAML_PADDING( 3 ), diff --git a/radio/src/storage/yaml/yaml_datastructs_t12.cpp b/radio/src/storage/yaml/yaml_datastructs_t12.cpp index 70afcd933..ac75e20f6 100644 --- a/radio/src/storage/yaml/yaml_datastructs_t12.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_t12.cpp @@ -455,10 +455,10 @@ static const struct YamlNode struct_MixData[] = { }; static const struct YamlNode struct_LimitData[] = { YAML_IDX, - YAML_SIGNED( "min", 11 ), - YAML_SIGNED( "max", 11 ), + YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ), + YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ), YAML_SIGNED( "ppmCenter", 10 ), - YAML_SIGNED( "offset", 11 ), + YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ), YAML_UNSIGNED( "symetrical", 1 ), YAML_UNSIGNED( "revert", 1 ), YAML_PADDING( 3 ), diff --git a/radio/src/storage/yaml/yaml_datastructs_t8.cpp b/radio/src/storage/yaml/yaml_datastructs_t8.cpp index 726868e50..0724e41b4 100644 --- a/radio/src/storage/yaml/yaml_datastructs_t8.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_t8.cpp @@ -455,10 +455,10 @@ static const struct YamlNode struct_MixData[] = { }; static const struct YamlNode struct_LimitData[] = { YAML_IDX, - YAML_SIGNED( "min", 11 ), - YAML_SIGNED( "max", 11 ), + YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ), + YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ), YAML_SIGNED( "ppmCenter", 10 ), - YAML_SIGNED( "offset", 11 ), + YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ), YAML_UNSIGNED( "symetrical", 1 ), YAML_UNSIGNED( "revert", 1 ), YAML_PADDING( 3 ), diff --git a/radio/src/storage/yaml/yaml_datastructs_tlite.cpp b/radio/src/storage/yaml/yaml_datastructs_tlite.cpp index 726868e50..0724e41b4 100644 --- a/radio/src/storage/yaml/yaml_datastructs_tlite.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_tlite.cpp @@ -455,10 +455,10 @@ static const struct YamlNode struct_MixData[] = { }; static const struct YamlNode struct_LimitData[] = { YAML_IDX, - YAML_SIGNED( "min", 11 ), - YAML_SIGNED( "max", 11 ), + YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ), + YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ), YAML_SIGNED( "ppmCenter", 10 ), - YAML_SIGNED( "offset", 11 ), + YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ), YAML_UNSIGNED( "symetrical", 1 ), YAML_UNSIGNED( "revert", 1 ), YAML_PADDING( 3 ), diff --git a/radio/src/storage/yaml/yaml_datastructs_tpro.cpp b/radio/src/storage/yaml/yaml_datastructs_tpro.cpp index 6966b1ff8..7a2170a79 100644 --- a/radio/src/storage/yaml/yaml_datastructs_tpro.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_tpro.cpp @@ -336,6 +336,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 ), @@ -372,7 +373,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 ), @@ -447,7 +448,7 @@ static const struct YamlNode struct_MixData[] = { YAML_UNSIGNED( "mixWarn", 2 ), YAML_ENUM("mltpx", 2, enum_MixerMultiplex), YAML_PADDING( 1 ), - YAML_SIGNED( "offset", 14 ), + YAML_SIGNED_CUST( "offset", 14, in_read_weight, in_write_weight ), YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ), YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ), YAML_STRUCT("curve", 16, struct_CurveRef, NULL), @@ -460,10 +461,10 @@ static const struct YamlNode struct_MixData[] = { }; static const struct YamlNode struct_LimitData[] = { YAML_IDX, - YAML_SIGNED( "min", 11 ), - YAML_SIGNED( "max", 11 ), + YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ), + YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ), YAML_SIGNED( "ppmCenter", 10 ), - YAML_SIGNED( "offset", 11 ), + YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ), YAML_UNSIGNED( "symetrical", 1 ), YAML_UNSIGNED( "revert", 1 ), YAML_PADDING( 3 ), @@ -482,7 +483,7 @@ static const struct YamlNode struct_ExpoData[] = { YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ), YAML_PADDING( 1 ), YAML_STRING("name", 6), - YAML_SIGNED( "offset", 8 ), + YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ), YAML_STRUCT("curve", 16, struct_CurveRef, NULL), YAML_END }; diff --git a/radio/src/storage/yaml/yaml_datastructs_tx12.cpp b/radio/src/storage/yaml/yaml_datastructs_tx12.cpp index 4e3d7af25..4adc3b16f 100644 --- a/radio/src/storage/yaml/yaml_datastructs_tx12.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_tx12.cpp @@ -455,10 +455,10 @@ static const struct YamlNode struct_MixData[] = { }; static const struct YamlNode struct_LimitData[] = { YAML_IDX, - YAML_SIGNED( "min", 11 ), - YAML_SIGNED( "max", 11 ), + YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ), + YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ), YAML_SIGNED( "ppmCenter", 10 ), - YAML_SIGNED( "offset", 11 ), + YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ), YAML_UNSIGNED( "symetrical", 1 ), YAML_UNSIGNED( "revert", 1 ), YAML_PADDING( 3 ), diff --git a/radio/src/storage/yaml/yaml_datastructs_x10.cpp b/radio/src/storage/yaml/yaml_datastructs_x10.cpp index f0b84b3b7..71343a40c 100644 --- a/radio/src/storage/yaml/yaml_datastructs_x10.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_x10.cpp @@ -510,10 +510,10 @@ static const struct YamlNode struct_MixData[] = { }; static const struct YamlNode struct_LimitData[] = { YAML_IDX, - YAML_SIGNED( "min", 11 ), - YAML_SIGNED( "max", 11 ), + YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ), + YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ), YAML_SIGNED( "ppmCenter", 10 ), - YAML_SIGNED( "offset", 11 ), + YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ), YAML_UNSIGNED( "symetrical", 1 ), YAML_UNSIGNED( "revert", 1 ), YAML_PADDING( 3 ), diff --git a/radio/src/storage/yaml/yaml_datastructs_x12s.cpp b/radio/src/storage/yaml/yaml_datastructs_x12s.cpp index 06356a794..f5de5f1cf 100644 --- a/radio/src/storage/yaml/yaml_datastructs_x12s.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_x12s.cpp @@ -508,10 +508,10 @@ static const struct YamlNode struct_MixData[] = { }; static const struct YamlNode struct_LimitData[] = { YAML_IDX, - YAML_SIGNED( "min", 11 ), - YAML_SIGNED( "max", 11 ), + YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ), + YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ), YAML_SIGNED( "ppmCenter", 10 ), - YAML_SIGNED( "offset", 11 ), + YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ), YAML_UNSIGNED( "symetrical", 1 ), YAML_UNSIGNED( "revert", 1 ), YAML_PADDING( 3 ), diff --git a/radio/src/storage/yaml/yaml_datastructs_x7.cpp b/radio/src/storage/yaml/yaml_datastructs_x7.cpp index 726868e50..0724e41b4 100644 --- a/radio/src/storage/yaml/yaml_datastructs_x7.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_x7.cpp @@ -455,10 +455,10 @@ static const struct YamlNode struct_MixData[] = { }; static const struct YamlNode struct_LimitData[] = { YAML_IDX, - YAML_SIGNED( "min", 11 ), - YAML_SIGNED( "max", 11 ), + YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ), + YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ), YAML_SIGNED( "ppmCenter", 10 ), - YAML_SIGNED( "offset", 11 ), + YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ), YAML_UNSIGNED( "symetrical", 1 ), YAML_UNSIGNED( "revert", 1 ), YAML_PADDING( 3 ), diff --git a/radio/src/storage/yaml/yaml_datastructs_x9d.cpp b/radio/src/storage/yaml/yaml_datastructs_x9d.cpp index b50050d00..aab9477a0 100644 --- a/radio/src/storage/yaml/yaml_datastructs_x9d.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_x9d.cpp @@ -463,10 +463,10 @@ static const struct YamlNode struct_MixData[] = { }; static const struct YamlNode struct_LimitData[] = { YAML_IDX, - YAML_SIGNED( "min", 11 ), - YAML_SIGNED( "max", 11 ), + YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ), + YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ), YAML_SIGNED( "ppmCenter", 10 ), - YAML_SIGNED( "offset", 11 ), + YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ), YAML_UNSIGNED( "symetrical", 1 ), YAML_UNSIGNED( "revert", 1 ), YAML_PADDING( 3 ), diff --git a/radio/src/storage/yaml/yaml_datastructs_x9e.cpp b/radio/src/storage/yaml/yaml_datastructs_x9e.cpp index 87cd0815f..fb382c0b9 100644 --- a/radio/src/storage/yaml/yaml_datastructs_x9e.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_x9e.cpp @@ -502,10 +502,10 @@ static const struct YamlNode struct_MixData[] = { }; static const struct YamlNode struct_LimitData[] = { YAML_IDX, - YAML_SIGNED( "min", 11 ), - YAML_SIGNED( "max", 11 ), + YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ), + YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ), YAML_SIGNED( "ppmCenter", 10 ), - YAML_SIGNED( "offset", 11 ), + YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ), YAML_UNSIGNED( "symetrical", 1 ), YAML_UNSIGNED( "revert", 1 ), YAML_PADDING( 3 ), diff --git a/radio/src/storage/yaml/yaml_datastructs_x9lite.cpp b/radio/src/storage/yaml/yaml_datastructs_x9lite.cpp index 6d3d90d78..9609d2638 100644 --- a/radio/src/storage/yaml/yaml_datastructs_x9lite.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_x9lite.cpp @@ -440,10 +440,10 @@ static const struct YamlNode struct_MixData[] = { }; static const struct YamlNode struct_LimitData[] = { YAML_IDX, - YAML_SIGNED( "min", 11 ), - YAML_SIGNED( "max", 11 ), + YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ), + YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ), YAML_SIGNED( "ppmCenter", 10 ), - YAML_SIGNED( "offset", 11 ), + YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ), YAML_UNSIGNED( "symetrical", 1 ), YAML_UNSIGNED( "revert", 1 ), YAML_PADDING( 3 ), diff --git a/radio/src/storage/yaml/yaml_datastructs_x9lites.cpp b/radio/src/storage/yaml/yaml_datastructs_x9lites.cpp index 97b3feed3..09070865c 100644 --- a/radio/src/storage/yaml/yaml_datastructs_x9lites.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_x9lites.cpp @@ -450,10 +450,10 @@ static const struct YamlNode struct_MixData[] = { }; static const struct YamlNode struct_LimitData[] = { YAML_IDX, - YAML_SIGNED( "min", 11 ), - YAML_SIGNED( "max", 11 ), + YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ), + YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ), YAML_SIGNED( "ppmCenter", 10 ), - YAML_SIGNED( "offset", 11 ), + YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ), YAML_UNSIGNED( "symetrical", 1 ), YAML_UNSIGNED( "revert", 1 ), YAML_PADDING( 3 ), diff --git a/radio/src/storage/yaml/yaml_datastructs_xlite.cpp b/radio/src/storage/yaml/yaml_datastructs_xlite.cpp index 58bbb5417..24e913aed 100644 --- a/radio/src/storage/yaml/yaml_datastructs_xlite.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_xlite.cpp @@ -447,10 +447,10 @@ static const struct YamlNode struct_MixData[] = { }; static const struct YamlNode struct_LimitData[] = { YAML_IDX, - YAML_SIGNED( "min", 11 ), - YAML_SIGNED( "max", 11 ), + YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ), + YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ), YAML_SIGNED( "ppmCenter", 10 ), - YAML_SIGNED( "offset", 11 ), + YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ), YAML_UNSIGNED( "symetrical", 1 ), YAML_UNSIGNED( "revert", 1 ), YAML_PADDING( 3 ), diff --git a/radio/src/storage/yaml/yaml_datastructs_xlites.cpp b/radio/src/storage/yaml/yaml_datastructs_xlites.cpp index 1b69f0491..c3a35cd86 100644 --- a/radio/src/storage/yaml/yaml_datastructs_xlites.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_xlites.cpp @@ -451,10 +451,10 @@ static const struct YamlNode struct_MixData[] = { }; static const struct YamlNode struct_LimitData[] = { YAML_IDX, - YAML_SIGNED( "min", 11 ), - YAML_SIGNED( "max", 11 ), + YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ), + YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ), YAML_SIGNED( "ppmCenter", 10 ), - YAML_SIGNED( "offset", 11 ), + YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ), YAML_UNSIGNED( "symetrical", 1 ), YAML_UNSIGNED( "revert", 1 ), YAML_PADDING( 3 ), diff --git a/radio/src/storage/yaml/yaml_datastructs_zorro.cpp b/radio/src/storage/yaml/yaml_datastructs_zorro.cpp index b4d09d03a..fbd0b0c19 100644 --- a/radio/src/storage/yaml/yaml_datastructs_zorro.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_zorro.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 ), @@ -441,7 +442,7 @@ static const struct YamlNode struct_MixData[] = { YAML_UNSIGNED( "mixWarn", 2 ), YAML_ENUM("mltpx", 2, enum_MixerMultiplex), YAML_PADDING( 1 ), - YAML_SIGNED( "offset", 14 ), + YAML_SIGNED_CUST( "offset", 14, in_read_weight, in_write_weight ), YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ), YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ), YAML_STRUCT("curve", 16, struct_CurveRef, NULL), @@ -454,10 +455,10 @@ static const struct YamlNode struct_MixData[] = { }; static const struct YamlNode struct_LimitData[] = { YAML_IDX, - YAML_SIGNED( "min", 11 ), - YAML_SIGNED( "max", 11 ), + YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ), + YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ), YAML_SIGNED( "ppmCenter", 10 ), - YAML_SIGNED( "offset", 11 ), + YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ), YAML_UNSIGNED( "symetrical", 1 ), YAML_UNSIGNED( "revert", 1 ), YAML_PADDING( 3 ), @@ -476,7 +477,7 @@ static const struct YamlNode struct_ExpoData[] = { YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ), YAML_PADDING( 1 ), YAML_STRING("name", 6), - YAML_SIGNED( "offset", 8 ), + YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ), YAML_STRUCT("curve", 16, struct_CurveRef, NULL), YAML_END };