diff --git a/radio/src/lua/api_model.cpp b/radio/src/lua/api_model.cpp index 2e59feefd2e..4a76aebeb5e 100644 --- a/radio/src/lua/api_model.cpp +++ b/radio/src/lua/api_model.cpp @@ -890,7 +890,7 @@ static int luaModelInsertMix(lua_State *L) if (chndestCh = channel; mix->srcRaw = channel + 1; if (!isSourceAvailable(mix->srcRaw)) { - if (s_currCh > adcGetMaxInputs(ADC_INPUT_MAIN)) { + if (channel >= adcGetMaxInputs(ADC_INPUT_MAIN)) { mix->srcRaw = MIXSRC_FIRST_STICK + channel; } else { mix->srcRaw = MIXSRC_FIRST_STICK + inputMappingChannelOrder(channel);