feat: Add options to disable radio and model menu tabs (#3484)
* Add options to disable radio and model menu tabs. - Update radio and model data structs - UI for color LCD radios - Convert existing 'noGlobalFunctions' property. - Language strings. * Make 'theme' control specific to color LCD radios. * Add B&W radio UI. * Simplify code, reduce compiled code size. Fix page count display on model select tab. Fix GVARS for 212x64 radios. * Collapse timer sections if timer is off. * Remove 'Use global functions' checkbox from B&W model setup. * Make preflight checks, throttle and view options sections expand & collapse (default collapsed). * Fix build. * Add view options to companion data classes, save and load values in YAML files. Fix scrolling for radio setup view options. * Add Companion UI for view option settings. * Remove 'Mixes' from list of tabs that can be hidden. * Updated Companion UI from elecpower. * Use view options flags to enable/disable functionality: - skip heli mixer logic if heli not enabled - Remove heli, gvars and telemetry options from source selection if not enabled * Remove 'flight mode', 'curve' and 'global variable' settings from input & mix editors if option disabled. * Rename 'View Options' to 'Enabled Features'. Put GVAR option under Flight Mode and indent text. Make relationship between FM and GV more obvious. * Remove global variable option dependency on flight modes. Hide FM1-FM8 in global variables if flight modes hidden. * Hide 'Custom Mixer Scripts' in source selection menu popup if disabled. * Add translation strings for Hebrew language file. * Fix typo. Add comment for double call to setCurrentTab.
This commit is contained in:
@@ -764,6 +764,22 @@ PACK(struct ModelData {
|
||||
uint8_t usbJoystickIfMode:3 ENUM(USBJoystickIfMode);
|
||||
uint8_t usbJoystickCircularCut:4;
|
||||
USBJoystickChData usbJoystickCh[USBJ_MAX_JOYSTICK_CHANNELS];
|
||||
|
||||
// Radio level tabs control (model settings)
|
||||
#if defined(COLORLCD)
|
||||
uint8_t radioThemesDisabled:2 ENUM(ModelOverridableEnable);
|
||||
#endif
|
||||
uint8_t radioGFDisabled:2 ENUM(ModelOverridableEnable);
|
||||
uint8_t radioTrainerDisabled:2 ENUM(ModelOverridableEnable);
|
||||
// Model level tabs control (model setting)
|
||||
uint8_t modelHeliDisabled:2 ENUM(ModelOverridableEnable);
|
||||
uint8_t modelFMDisabled:2 ENUM(ModelOverridableEnable);
|
||||
uint8_t modelCurvesDisabled:2 ENUM(ModelOverridableEnable);
|
||||
uint8_t modelGVDisabled:2 ENUM(ModelOverridableEnable);
|
||||
uint8_t modelLSDisabled:2 ENUM(ModelOverridableEnable);
|
||||
uint8_t modelSFDisabled:2 ENUM(ModelOverridableEnable);
|
||||
uint8_t modelCustomScriptsDisabled:2 ENUM(ModelOverridableEnable);
|
||||
uint8_t modelTelemetryDisabled:2 ENUM(ModelOverridableEnable);
|
||||
});
|
||||
|
||||
/*
|
||||
@@ -955,6 +971,22 @@ PACK(struct RadioData {
|
||||
#if defined(COLORLCD)
|
||||
NOBACKUP(char selectedTheme[SELECTED_THEME_NAME_LEN]);
|
||||
#endif
|
||||
|
||||
// Radio level tabs control (global settings)
|
||||
#if defined(COLORLCD)
|
||||
uint8_t radioThemesDisabled:1;
|
||||
#endif
|
||||
uint8_t radioGFDisabled:1;
|
||||
uint8_t radioTrainerDisabled:1;
|
||||
// Model level tabs control (global setting)
|
||||
uint8_t modelHeliDisabled:1;
|
||||
uint8_t modelFMDisabled:1;
|
||||
uint8_t modelCurvesDisabled:1;
|
||||
uint8_t modelGVDisabled:1;
|
||||
uint8_t modelLSDisabled:1;
|
||||
uint8_t modelSFDisabled:1;
|
||||
uint8_t modelCustomScriptsDisabled:1;
|
||||
uint8_t modelTelemetryDisabled:1;
|
||||
});
|
||||
|
||||
#undef SWITCHES_WARNING_DATA
|
||||
|
||||
Reference in New Issue
Block a user