fix(bw): fixes and improvements for model setup page (#5256)

Fix: when the ENTER key is pressed on the center beep warning list to enter edit mode, the first value is also toggled (128x64).
Fix: 6POS switches are shown in center beep warning list (128x64).
Fix: disabled pots/sliders are shown in the center beep warning list.
Feat: hide the interactive checklist toggle if the checklist is disabled.
Feat: hide the throttle custom position settings if the throttle warning is disabled.
Feat: hide the throttle custom position value if the custom position check is disabled.
This commit is contained in:
philmoz
2024-07-07 11:52:34 +10:00
committed by GitHub
parent 8dad05e1bb
commit 0fc22a33c0
2 changed files with 17 additions and 10 deletions
+5 -5
View File
@@ -531,10 +531,10 @@ void menuModelSetup(event_t event)
0, // ITEM_MODEL_SETUP_PREFLIGHT_LABEL
PREFLIGHT_ROW(0), // ITEM_MODEL_SETUP_CHECKLIST_DISPLAY
PREFLIGHT_ROW(0), // ITEM_MODEL_SETUP_CHECKLIST_INTERACTIVE
PREFLIGHT_ROW(0), // ITEM_MODEL_SETUP_THROTTLE_WARNING
PREFLIGHT_ROW(0), // ITEM_MODEL_SETUP_CUSTOM_THROTTLE_WARNING
PREFLIGHT_ROW(0), // ITEM_MODEL_SETUP_CUSTOM_THROTTLE_WARNING_VALUE
PREFLIGHT_ROW(g_model.displayChecklist ? 0 : HIDDEN_ROW), // Checklist interactive
PREFLIGHT_ROW(0), // Throttle warning
PREFLIGHT_ROW(!g_model.disableThrottleWarning ? 0 : HIDDEN_ROW), // Custom position for throttle warning enable
PREFLIGHT_ROW(!g_model.disableThrottleWarning && g_model.enableCustomThrottleWarning ? 0 : HIDDEN_ROW), // Custom position for throttle warning value
SW_WARN_ROWS, // ITEM_MODEL_SETUP_SWITCHES_WARNING1
POT_WARN_ROWS, // ITEM_MODEL_SETUP_POTS_WARNING
@@ -1011,7 +1011,7 @@ void menuModelSetup(event_t event)
uint8_t max_inputs = adcGetMaxInputs(ADC_INPUT_MAIN) + adcGetMaxInputs(ADC_INPUT_FLEX);
coord_t x = MODEL_SETUP_2ND_COLUMN;
for (uint8_t i = 0; i < max_inputs; i++) {
if ( i >= pot_offset && IS_POT_MULTIPOS(i - pot_offset) ) {
if ( i >= pot_offset && (IS_POT_MULTIPOS(i - pot_offset) || !IS_POT_SLIDER_AVAILABLE(i - pot_offset)) ) {
if (attr && menuHorizontalPosition == i) repeatLastCursorMove(event);
continue;
}