Fix YAML radio format: outputs GVAR support and small fixes

This commit is contained in:
Raphael Coeffic
2021-12-31 10:53:11 +01:00
parent 38e6748e14
commit bf41080b57
33 changed files with 109 additions and 107 deletions
+2 -3
View File
@@ -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,
+3 -3
View File
@@ -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;
@@ -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 ),
@@ -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 ),
@@ -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 ),
@@ -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 ),
@@ -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 ),
@@ -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 ),
@@ -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 ),
@@ -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 ),
@@ -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 ),
@@ -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 ),
@@ -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 ),
@@ -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 ),
@@ -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 ),
@@ -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 ),
@@ -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
};
@@ -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 ),
@@ -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 ),
@@ -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 ),
@@ -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 ),
@@ -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
};
@@ -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 ),
@@ -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 ),
@@ -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 ),
@@ -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 ),
@@ -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 ),
@@ -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 ),
@@ -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 ),
@@ -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 ),
@@ -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 ),
@@ -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 ),
@@ -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
};