Skip to content

Commit 690c539

Browse files
author
3djc
committed
fix: wrong source string display
1 parent f7876b0 commit 690c539

File tree

1 file changed

+1
-57
lines changed

1 file changed

+1
-57
lines changed

radio/src/gui/212x64/lcd.cpp

+1-57
Original file line numberDiff line numberDiff line change
@@ -656,64 +656,8 @@ void drawSource(coord_t x, coord_t y, uint32_t idx, LcdFlags att)
656656
lcdDrawChar(lcdLastRightPos, y, 'a'+qr.rem, att);
657657
}
658658
}
659-
660-
else if (idx <= MIXSRC_LAST_POT) {
661-
lcdDrawText(x, y, getSourceString(idx), att);
662-
}
663-
else if (idx >= MIXSRC_FIRST_SWITCH && idx <= MIXSRC_LAST_SWITCH) {
664-
lcdDrawText(x, y, getSourceString(idx), att);
665-
}
666-
else if (idx <= MIXSRC_LAST_LOGICAL_SWITCH) {
667-
idx -= MIXSRC_FIRST_LOGICAL_SWITCH;
668-
drawSwitch(x, y, idx + SWSRC_FIRST_LOGICAL_SWITCH, att);
669-
} else if (idx <= MIXSRC_LAST_TRAINER) {
670-
idx -= MIXSRC_FIRST_TRAINER;
671-
drawStringWithIndex(x, y, STR_PPM_TRAINER, idx + 1, att);
672-
} else if (idx <= MIXSRC_LAST_CH) {
673-
idx -= MIXSRC_FIRST_CH;
674-
drawStringWithIndex(x, y, STR_CH, idx + 1, att);
675-
if (ZEXIST(g_model.limitData[idx].name) && (att & STREXPANDED)) {
676-
lcdDrawChar(lcdLastRightPos, y, ' ', att|SMLSIZE);
677-
lcdDrawSizedText(lcdLastRightPos+3, y, g_model.limitData[idx].name, LEN_CHANNEL_NAME, att|SMLSIZE);
678-
}
679-
}
680-
else if (idx <= MIXSRC_LAST_GVAR) {
681-
idx -= MIXSRC_FIRST_GVAR - 1;
682-
drawStringWithIndex(x, y, STR_GV, idx, att);
683-
}
684-
else if (idx < MIXSRC_FIRST_TIMER) {
685-
// Built-in sources: TX Voltage, Time, GPS (+ reserved)
686-
const char* src_str;
687-
switch(idx) {
688-
case MIXSRC_TX_VOLTAGE:
689-
src_str = STR_SRC_BATT;
690-
break;
691-
case MIXSRC_TX_TIME:
692-
src_str = STR_SRC_TIME;
693-
break;
694-
case MIXSRC_TX_GPS:
695-
src_str = STR_SRC_BATT;
696-
break;
697-
default:
698-
src_str = "";
699-
break;
700-
}
701-
lcdDrawText(x, y, src_str, att);
702-
}
703-
else if (idx <= MIXSRC_LAST_TIMER) {
704-
idx -= MIXSRC_FIRST_TIMER;
705-
if(g_model.timers[idx].name[0]) {
706-
lcdDrawSizedText(x, y, g_model.timers[idx].name, LEN_TIMER_NAME, att);
707-
}
708-
else {
709-
drawStringWithIndex(x, y, STR_SRC_TIMER, idx + 1, att);
710-
}
711-
}
712659
else {
713-
idx -= MIXSRC_FIRST_TELEM;
714-
div_t qr = div(idx, 3);
715-
lcdDrawSizedText(x, y, g_model.telemetrySensors[qr.quot].label, TELEM_LABEL_LEN, att);
716-
if (qr.rem) lcdDrawChar(lcdLastRightPos, y, qr.rem==2 ? '+' : '-', att);
660+
lcdDrawText(x, y, getSourceString(idx), att);
717661
}
718662
}
719663

0 commit comments

Comments
 (0)