diff --git a/radio/src/gui/menu_model.cpp b/radio/src/gui/menu_model.cpp index b47201ac7..4e1b0a7f8 100644 --- a/radio/src/gui/menu_model.cpp +++ b/radio/src/gui/menu_model.cpp @@ -4550,8 +4550,16 @@ void menuModelCustomSwitches(uint8_t event) #endif } - // CSW and switch + // CSW AND switch +#if defined(CPUARM) putsSwitches(CSW_4TH_COLUMN, y, cs->andsw, horz==3 ? attr : 0); +#else + uint8_t andsw = cs->andsw; + if (andsw > SWSRC_LAST_SWITCH) { + andsw += SWSRC_SW1-SWSRC_LAST_SWITCH-1; + } + putsSwitches(CSW_4TH_COLUMN, y, andsw, horz==3 ? attr : 0); +#endif #if defined(CPUARM) // CSW duration diff --git a/radio/src/opentx.cpp b/radio/src/opentx.cpp index 87d3d1f55..ffa1ee96c 100644 --- a/radio/src/opentx.cpp +++ b/radio/src/opentx.cpp @@ -1414,7 +1414,14 @@ bool getSwitch(int8_t swtch) s_last_switch_used |= mask; CustomSwData * cs = cswAddress(cs_idx); +#if defined(CPUARM) + int8_t s = cs->andsw; +#else uint8_t s = cs->andsw; + if (s > SWSRC_LAST_SWITCH) { + s += SWSRC_SW1-SWSRC_LAST_SWITCH-1; + } +#endif if (cs->func == CS_OFF || (s && !getSwitch(s))) { csLastValue[cs_idx] = CS_LAST_VALUE_INIT; result = false;