Introduce T-pro and function switches handling

This commit is contained in:
3djc
2021-12-17 17:07:48 +01:00
committed by Raphael Coeffic
parent 69dafd13c0
commit d31482c18b
63 changed files with 1324 additions and 70 deletions
+14 -1
View File
@@ -616,6 +616,17 @@ PACK(struct CustomScreenData {
#define SCRIPT_DATA
#endif
#if defined(FUNCTION_SWITCHES) && NUM_FUNCTIONS_SWITCHES < 8
#define FUNCTION_SWITCHS_FIELDS \
uint16_t functionSwitchConfig; \
uint16_t functionSwitchGroup; \
uint16_t functionSwitchStartConfig; \
uint8_t functionSwitchLogicalState; \
char switchNames[NUM_FUNCTIONS_SWITCHES][LEN_SWITCH_NAME];
#else
#define FUNCTION_SWITCHS_FIELDS
#endif
PACK(struct PartialModel {
ModelHeader header;
TimerData timers[MAX_TIMERS];
@@ -683,6 +694,8 @@ PACK(struct ModelData {
char modelRegistrationID[PXX2_LEN_REGISTRATION_ID];
FUNCTION_SWITCHS_FIELDS
bool isTrainerTraineeEnable() const
{
#if defined(PCBNV14)
@@ -794,7 +807,7 @@ PACK(struct TrainerData {
uint8_t backlightColor; \
CUST_ARRAY(sticksConfig, struct_sticksConfig, stick_name_valid); \
swconfig_t switchConfig ARRAY(2,struct_switchConfig,nullptr); \
char switchNames[STORAGE_NUM_SWITCHES][LEN_SWITCH_NAME] SKIP; \
char switchNames[STORAGE_NUM_SWITCHES - NUM_FUNCTIONS_SWITCHES][LEN_SWITCH_NAME] SKIP; \
char anaNames[NUM_STICKS+STORAGE_NUM_POTS+STORAGE_NUM_SLIDERS][LEN_ANA_NAME] SKIP; \
BLUETOOTH_FIELDS
#else