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)) {