Merge branch 'EdgeTX:main' into NV14-UI-FineTuning

This commit is contained in:
richardclli
2021-08-20 15:05:07 +08:00
committed by GitHub
2 changed files with 11 additions and 0 deletions
+1
View File
@@ -567,6 +567,7 @@ class ModuleWindow : public FormGroup {
channelStart->setMax(MAX_OUTPUT_CHANNELS - sentModuleChannels(moduleIdx) + 1);
});
channelEnd->enable(minModuleChannels(moduleIdx) < maxModuleChannels(moduleIdx));
if (channelEnd->getValue() > channelEnd->getMax()) channelEnd->setValue(channelEnd->getMax());
}
void update()
+10
View File
@@ -367,6 +367,16 @@ inline int8_t maxModuleChannels_M8(uint8_t moduleIdx)
else if (isModuleAFHDS3(moduleIdx)) {
return 10;
}
else if (isModuleDSM2(moduleIdx)) {
return -2; // 6 channels
}
else if (isModuleMultimoduleDSM2(moduleIdx)) {
return 4; // 12 channels
}
//TODO: This should be based on the selected protocol
else if(isModuleMultimodule(moduleIdx)) {
return 8; // 16 channels
}
else {
return maxChannelsModules_M8[g_model.moduleData[moduleIdx].type];
}