diff --git a/radio/src/gui/128x64/model_input_edit.cpp b/radio/src/gui/128x64/model_input_edit.cpp index c2e27f738..29889e0ca 100644 --- a/radio/src/gui/128x64/model_input_edit.cpp +++ b/radio/src/gui/128x64/model_input_edit.cpp @@ -102,7 +102,7 @@ void menuModelExpoOne(event_t event) case EXPO_FIELD_SOURCE: lcdDrawTextAlignedLeft(y, STR_SOURCE); drawSource(EXPO_ONE_2ND_COLUMN, y, ed->srcRaw, RIGHT|STREXPANDED|attr); - if (attr) ed->srcRaw = checkIncDec(event, ed->srcRaw, INPUTSRC_FIRST, INPUTSRC_LAST, EE_MODEL|INCDEC_SOURCE|NO_INCDEC_MARKS, isInputSourceAvailable); + if (attr) ed->srcRaw = checkIncDec(event, ed->srcRaw, INPUTSRC_FIRST, INPUTSRC_LAST, EE_MODEL|INCDEC_SOURCE|NO_INCDEC_MARKS, isSourceAvailableInInputs); break; case EXPO_FIELD_SCALE: diff --git a/radio/src/gui/212x64/model_input_edit.cpp b/radio/src/gui/212x64/model_input_edit.cpp index 715393cc4..64b7b81db 100644 --- a/radio/src/gui/212x64/model_input_edit.cpp +++ b/radio/src/gui/212x64/model_input_edit.cpp @@ -109,7 +109,7 @@ void menuModelExpoOne(event_t event) case EXPO_FIELD_SOURCE: lcdDrawTextAlignedLeft(y, STR_SOURCE); drawSource(EXPO_ONE_2ND_COLUMN, y, ed->srcRaw, STREXPANDED|attr); - if (attr) ed->srcRaw = checkIncDec(event, ed->srcRaw, INPUTSRC_FIRST, INPUTSRC_LAST, EE_MODEL|INCDEC_SOURCE|NO_INCDEC_MARKS, isInputSourceAvailable); + if (attr) ed->srcRaw = checkIncDec(event, ed->srcRaw, INPUTSRC_FIRST, INPUTSRC_LAST, EE_MODEL|INCDEC_SOURCE|NO_INCDEC_MARKS, isSourceAvailableInInputs); break; case EXPO_FIELD_SCALE: diff --git a/radio/src/gui/480x272/model_inputs.cpp b/radio/src/gui/480x272/model_inputs.cpp index 00ea22caa..c6a868df6 100644 --- a/radio/src/gui/480x272/model_inputs.cpp +++ b/radio/src/gui/480x272/model_inputs.cpp @@ -241,7 +241,7 @@ bool menuModelExpoOne(event_t event) lcdDrawText(MENUS_MARGIN_LEFT, y, STR_SOURCE); drawSource(EXPO_ONE_2ND_COLUMN, y, ed->srcRaw, menuHorizontalPosition==0 ? attr : 0); if (attr && menuHorizontalPosition==0) - ed->srcRaw = checkIncDec(event, ed->srcRaw, INPUTSRC_FIRST, INPUTSRC_LAST, EE_MODEL|INCDEC_SOURCE|NO_INCDEC_MARKS, isInputSourceAvailable); + ed->srcRaw = checkIncDec(event, ed->srcRaw, INPUTSRC_FIRST, INPUTSRC_LAST, EE_MODEL|INCDEC_SOURCE|NO_INCDEC_MARKS, isSourceAvailableInInputs); if (ed->srcRaw >= MIXSRC_FIRST_TELEM) { drawSensorCustomValue(EXPO_ONE_2ND_COLUMN+75, y, (ed->srcRaw - MIXSRC_FIRST_TELEM)/3, convertTelemValue(ed->srcRaw - MIXSRC_FIRST_TELEM + 1, ed->scale), LEFT|(menuHorizontalPosition==1?attr:0)); if (attr && menuHorizontalPosition == 1) ed->scale = checkIncDec(event, ed->scale, 0, maxTelemValue(ed->srcRaw - MIXSRC_FIRST_TELEM + 1), EE_MODEL); diff --git a/radio/src/gui/common/stdlcd/draw_functions.cpp b/radio/src/gui/common/stdlcd/draw_functions.cpp index 06eb7137a..3608abc62 100644 --- a/radio/src/gui/common/stdlcd/draw_functions.cpp +++ b/radio/src/gui/common/stdlcd/draw_functions.cpp @@ -25,7 +25,7 @@ void drawStringWithIndex(coord_t x, coord_t y, const char * str, uint8_t idx, Lc { if (flags & RIGHT) { lcdDrawNumber(x, y, idx, flags); - lcdDrawText(x-FWNUM, y, str, flags & ~LEADING0); + lcdDrawText(lcdNextPos, y, str, flags & ~LEADING0); } else { lcdDrawText(x, y, str, flags & ~LEADING0); diff --git a/radio/src/gui/gui_common.cpp b/radio/src/gui/gui_common.cpp index daee811e6..9b95c68dc 100644 --- a/radio/src/gui/gui_common.cpp +++ b/radio/src/gui/gui_common.cpp @@ -240,22 +240,17 @@ bool isSourceAvailableInCustomSwitches(int source) return result; } -bool isInputSourceAvailable(int source) +bool isSourceAvailableInInputs(int source) { if (source >= MIXSRC_FIRST_POT && source <= MIXSRC_LAST_POT) return IS_POT_SLIDER_AVAILABLE(POT1+source - MIXSRC_FIRST_POT); -#if defined(GYRO) - if (source >= MIXSRC_GYRO1 && source <= MIXSRC_GYRO2) - return true; -#endif - #if defined(PCBX10) if (source >= MIXSRC_MOUSE1 && source <= MIXSRC_MOUSE2) return false; #endif - if (source >= MIXSRC_Rud && source < MIXSRC_MAX) + if (source >= MIXSRC_Rud && source <= MIXSRC_MAX) return true; if (source >= MIXSRC_FIRST_TRIM && source <= MIXSRC_LAST_TRIM) diff --git a/radio/src/gui/gui_common.h b/radio/src/gui/gui_common.h index 43dc8df80..d846f0567 100644 --- a/radio/src/gui/gui_common.h +++ b/radio/src/gui/gui_common.h @@ -60,7 +60,7 @@ int getFirstAvailable(int min, int max, IsValueAvailable isValueAvailable); bool isTrimModeAvailable(int mode); bool isInputAvailable(int input); -bool isInputSourceAvailable(int source); +bool isSourceAvailableInInputs(int source); bool isThrottleSourceAvailable(int source); bool isLogicalSwitchFunctionAvailable(int function); bool isLogicalSwitchAvailable(int index);