diff --git a/radio/src/gui/common/stdlcd/model_receiver_options.cpp b/radio/src/gui/common/stdlcd/model_receiver_options.cpp index 87c596be0..f5c799095 100644 --- a/radio/src/gui/common/stdlcd/model_receiver_options.cpp +++ b/radio/src/gui/common/stdlcd/model_receiver_options.cpp @@ -122,7 +122,8 @@ void menuModelReceiverOptions(event_t event) { uint8_t pin = i - ITEM_RECEIVER_PINMAP_FIRST; if (pin < reusableBuffer.hardwareAndSettings.receiverSettings.outputsCount) { - uint8_t channel = g_model.moduleData[g_moduleIdx].channelsStart + reusableBuffer.hardwareAndSettings.receiverSettings.outputsMapping[pin]; + uint8_t & mapping = reusableBuffer.hardwareAndSettings.receiverSettings.outputsMapping[pin]; + uint8_t channel = g_model.moduleData[g_moduleIdx].channelsStart + mapping; int32_t channelValue = channelOutputs[channel]; lcdDrawText(0, y, STR_PIN); lcdDrawNumber(lcdLastRightPos + 1, y, pin + 1); @@ -130,9 +131,8 @@ void menuModelReceiverOptions(event_t event) // Channel if (attr) { - channel = checkIncDec(event, channel, 0, sentModuleChannels(g_moduleIdx) - 1); + mapping = checkIncDec(event, mapping, 0, sentModuleChannels(g_moduleIdx) - 1); if (checkIncDec_Ret) { - reusableBuffer.hardwareAndSettings.receiverSettings.outputsMapping[pin] = channel; reusableBuffer.hardwareAndSettings.receiverSettings.dirty = true; } }