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
@@ -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
};