fix(b&w): Center beep settings on 212 display not working (#3743)

This commit is contained in:
3djc
2023-07-05 21:03:32 +10:00
committed by GitHub
parent b8e690575d
commit 0934935cdb
2 changed files with 16 additions and 23 deletions
+10 -3
View File
@@ -1013,8 +1013,8 @@ void menuModelSetup(event_t event)
lcdDrawTextAlignedLeft(y, STR_BEEPCTR);
uint8_t pot_offset = adcGetInputOffset(ADC_INPUT_POT);
uint8_t max_inputs = adcGetMaxInputs(ADC_INPUT_MAIN) + adcGetMaxInputs(ADC_INPUT_POT);
coord_t x = MODEL_SETUP_2ND_COLUMN;
for (uint8_t i = 0; i < max_inputs; i++) {
coord_t x = MODEL_SETUP_2ND_COLUMN + i*FW;
if ( i >= pot_offset && IS_POT_MULTIPOS(i - pot_offset) ) {
if (attr && menuHorizontalPosition == i) repeatLastCursorMove(event);
continue;
@@ -1022,9 +1022,16 @@ void menuModelSetup(event_t event)
LcdFlags flags = 0;
if ((menuHorizontalPosition == i) && attr)
flags = BLINK | INVERS;
else if (ANALOG_CENTER_BEEP(x) || (attr && CURSOR_ON_LINE()))
else if (ANALOG_CENTER_BEEP(i) || (attr && CURSOR_ON_LINE()))
flags = INVERS;
lcdDrawText(x, y, getAnalogShortLabel(i), flags);
if (adcGetMaxInputs(ADC_INPUT_POT) > 4 || i < pot_offset) {
lcdDrawText(x, y, getAnalogShortLabel(i), flags);
}
else {
lcdDrawText(x, y, getPotLabel(i - pot_offset), flags);
}
x = lcdNextPos;
if (i >= pot_offset - 1) x+=2;
}
if (attr && CURSOR_ON_CELL) {
if (event==EVT_KEY_BREAK(KEY_ENTER)) {
+6 -20
View File
@@ -174,30 +174,16 @@ LEGACY_NAMES = [
"yaml": "POT1",
"lua": "s1",
"label": "F1",
"short_label": "1",
"short_label": "F1",
"description": "Potentiometer 1"
},
"P2": {
"yaml": "POT2",
"lua": "s2",
"label": "F2",
"short_label": "2",
"short_label": "F2",
"description": "Potentiometer 2"
},
"P3": {
"yaml": "POT3",
"lua": "s3",
"label": "EXT3",
"short_label": "3",
"description": "Potentiometer 3"
},
"P4": {
"yaml": "POT4",
"lua": "s4",
"label": "EXT4",
"short_label": "4",
"description": "Potentiometer 4"
},
"SL1": {
"yaml": "SLIDER1",
"lua": "ls",
@@ -216,15 +202,15 @@ LEGACY_NAMES = [
"yaml": "SLIDER3",
"lua": "lcs",
"label": "S1",
"short_label": "1",
"description": "Left center slider (X9E only)"
"short_label": "S1",
"description": "Left center slider"
},
"SL4": {
"yaml": "SLIDER4",
"lua": "rcs",
"label": "S2",
"short_label": "2",
"description": "Right center slider (X9E only)"
"short_label": "S2",
"description": "Right center slider"
}
}
},