Only change R9M chancount when exceeds max allowed (#7021)
This fixes #6983
This commit is contained in:
@@ -1499,7 +1499,7 @@ void menuModelSetup(event_t event)
|
||||
lcdDrawTextAtIndex(MODEL_SETUP_2ND_COLUMN, y, STR_R9M_FCC_POWER_VALUES, module.pxx.power, LEFT | attr);
|
||||
if (attr) {
|
||||
CHECK_INCDEC_MODELVAR_ZERO(event, module.pxx.power, R9M_FCC_POWER_MAX);
|
||||
if (s_editMode == 0 && reusableBuffer.moduleSetup.r9mPower != module.pxx.power) {
|
||||
if (s_editMode == 0 && reusableBuffer.moduleSetup.r9mPower != module.pxx.power && module.channelsCount > maxModuleChannels_M8(moduleIdx)) {
|
||||
module.channelsStart = 0;
|
||||
module.channelsCount = maxModuleChannels_M8(moduleIdx);
|
||||
}
|
||||
@@ -1516,7 +1516,8 @@ void menuModelSetup(event_t event)
|
||||
CHECK_INCDEC_MODELVAR_ZERO(event, module.pxx.power, R9M_LITE_LBT_POWER_MAX);
|
||||
if (s_editMode == 0 && reusableBuffer.moduleSetup.r9mPower != module.pxx.power) {
|
||||
module.channelsStart = 0;
|
||||
module.channelsCount = maxModuleChannels_M8(moduleIdx);
|
||||
if (module.channelsCount > maxModuleChannels_M8(moduleIdx))
|
||||
module.channelsCount = maxModuleChannels_M8(moduleIdx);
|
||||
if (reusableBuffer.moduleSetup.r9mPower + module.pxx.power < 5) { // switching between mode 2 and 3 does not require rebind
|
||||
POPUP_WARNING(STR_REBIND);
|
||||
}
|
||||
@@ -1532,7 +1533,8 @@ void menuModelSetup(event_t event)
|
||||
CHECK_INCDEC_MODELVAR_ZERO(event, module.pxx.power, R9M_LBT_POWER_MAX);
|
||||
if (s_editMode == 0 && reusableBuffer.moduleSetup.r9mPower != module.pxx.power) {
|
||||
module.channelsStart = 0;
|
||||
module.channelsCount = maxModuleChannels_M8(moduleIdx);
|
||||
if (module.channelsCount > maxModuleChannels_M8(moduleIdx))
|
||||
module.channelsCount = maxModuleChannels_M8(moduleIdx);
|
||||
if (reusableBuffer.moduleSetup.r9mPower + module.pxx.power < 5) { //switching between mode 2 and 3 does not require rebind
|
||||
POPUP_WARNING(STR_REBIND);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user