Skip to content

Commit

Permalink
reuse !
Browse files Browse the repository at this point in the history
  • Loading branch information
3djc authored and pfeerick committed Jun 26, 2023
1 parent d28be2d commit a31e1e9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
12 changes: 4 additions & 8 deletions radio/src/datastructs.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,17 +123,13 @@ static inline void check_struct()
CHKSIZE(RadioData, 862);
CHKSIZE(ModelData, 6220);
#elif defined(RADIO_TPRO)
CHKSIZE(RadioData, 846);
CHKSIZE(RadioData, 845);
CHKSIZE(ModelData, 6245);
#elif defined(RADIO_BOXER)
CHKSIZE(RadioData, 878);
CHKSIZE(RadioData, 877);
CHKSIZE(ModelData, 6221);
#elif defined(PCBX7)
#if defined(AUDIO_MUTE_GPIO)
CHKSIZE(RadioData, 869);
#else
CHKSIZE(RadioData, 868);
#endif
CHKSIZE(ModelData, 6220);
#elif defined(PCBX9E)
CHKSIZE(RadioData, 958);
Expand All @@ -143,14 +139,14 @@ static inline void check_struct()
CHKSIZE(ModelData, 6664);
#elif defined(PCBHORUS)
#if defined(PCBX10)
CHKSIZE(RadioData, 953);
CHKSIZE(RadioData, 952);
CHKSIZE(ModelData, 15454);
#else
CHKSIZE(RadioData, 934);
CHKSIZE(ModelData, 15452);
#endif
#elif defined(PCBNV14)
CHKSIZE(RadioData, 881);
CHKSIZE(RadioData, 880);
CHKSIZE(ModelData, 15268);
#endif

Expand Down
8 changes: 5 additions & 3 deletions radio/src/datastructs_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -940,9 +940,6 @@ PACK(struct RadioData {
NOBACKUP(int8_t varioPitch CUST(r_vPitch,w_vPitch));
NOBACKUP(int8_t varioRange CUST(r_vPitch,w_vPitch));
NOBACKUP(int8_t varioRepeat);
#if defined(AUDIO_MUTE_GPIO)
NOBACKUP(uint8_t audioMuteEnable:1);
#endif

CustomFunctionData customFn[MAX_SPECIAL_FUNCTIONS] FUNC(cfn_is_active);

Expand All @@ -966,7 +963,12 @@ PACK(struct RadioData {
#else
NOBACKUP(uint8_t stickDeadZoneSpare:3 SKIP);
#endif

#if defined(AUDIO_MUTE_GPIO)
NOBACKUP(uint8_t audioMuteEnable:1);
#else
NOBACKUP(uint8_t spare4:1 SKIP);
#endif

#if defined(IMU)
NOBACKUP(int8_t imuMax);
Expand Down
3 changes: 1 addition & 2 deletions radio/src/storage/yaml/yaml_datastructs_t8.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,6 @@ static const struct YamlNode struct_RadioData[] = {
YAML_SIGNED_CUST( "varioPitch", 8, r_vPitch, w_vPitch ),
YAML_SIGNED_CUST( "varioRange", 8, r_vPitch, w_vPitch ),
YAML_SIGNED( "varioRepeat", 8 ),
YAML_UNSIGNED( "audioMuteEnable", 1 ),
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
YAML_CUSTOM("auxSerialMode",r_serialMode,nullptr),
YAML_CUSTOM("aux2SerialMode",r_serialMode,nullptr),
Expand All @@ -426,7 +425,7 @@ static const struct YamlNode struct_RadioData[] = {
YAML_UNSIGNED( "rotEncMode", 2 ),
YAML_SIGNED( "uartSampleMode", 2 ),
YAML_PADDING( 3 ),
YAML_PADDING( 1 ),
YAML_UNSIGNED( "audioMuteEnable", 1 ),
YAML_UNSIGNED( "radioGFDisabled", 1 ),
YAML_UNSIGNED( "radioTrainerDisabled", 1 ),
YAML_UNSIGNED( "modelHeliDisabled", 1 ),
Expand Down

0 comments on commit a31e1e9

Please sign in to comment.