diff --git a/radio/src/opentx.cpp b/radio/src/opentx.cpp index efd91585f..12bc9c7c8 100644 --- a/radio/src/opentx.cpp +++ b/radio/src/opentx.cpp @@ -1316,7 +1316,7 @@ uint8_t checkTrim(event_t event) if (k>=0 && k<8 && !IS_KEY_BREAK(event)) { #endif // LH_DWN LH_UP LV_DWN LV_UP RV_DWN RV_UP RH_DWN RH_UP - uint8_t idx = CONVERT_MODE((uint8_t)k/2); + uint8_t idx = CONVERT_MODE_TRIMS((uint8_t)k/2); uint8_t phase; int before; bool thro; diff --git a/radio/src/opentx.h b/radio/src/opentx.h index 77a1874d5..684d35483 100644 --- a/radio/src/opentx.h +++ b/radio/src/opentx.h @@ -527,7 +527,13 @@ extern const pm_uint8_t modn12x3[]; #define ELE_STICK 1 #define THR_STICK 2 #define AIL_STICK 3 -#define CONVERT_MODE(x) (((x)<=AIL_STICK) ? pgm_read_byte(modn12x3 + 4*g_eeGeneral.stickMode + (x)) : (x) ) +#define CONVERT_MODE(x) (((x)<=AIL_STICK) ? pgm_read_byte(modn12x3 + 4*g_eeGeneral.stickMode + (x)) : (x) ) + +#if defined(PCBXLITE) + #define CONVERT_MODE_TRIMS(x) (((x) == RUD_STICK) ? AIL_STICK : ((x) == AIL_STICK) ? RUD_STICK : (x)) +#else + #define CONVERT_MODE_TRIMS(x) CONVERT_MODE(x) +#endif extern uint8_t channel_order(uint8_t x); diff --git a/radio/src/switches.cpp b/radio/src/switches.cpp index dcda0a4a5..6ccbfc588 100644 --- a/radio/src/switches.cpp +++ b/radio/src/switches.cpp @@ -495,7 +495,7 @@ bool getSwitch(swsrc_t swtch) #endif else if (cs_idx <= SWSRC_LAST_TRIM) { uint8_t idx = cs_idx - SWSRC_FIRST_TRIM; - idx = (CONVERT_MODE(idx/2) << 1) + (idx & 1); + idx = (CONVERT_MODE_TRIMS(idx/2) << 1) + (idx & 1); result = trimDown(idx); } #if ROTARY_ENCODERS > 0