Implemented proper logic for number of channels (incl. start channel)

This commit is contained in:
Raphael Coeffic
2022-03-24 10:40:17 +01:00
committed by Raphael Coeffic
parent 9e40aaa215
commit 7922afd9ca
5 changed files with 26 additions and 15 deletions
+4 -1
View File
@@ -1129,7 +1129,10 @@ class ModuleWindow : public FormGroup {
});
bindButton->setCheckHandler([=]() {
if (moduleState[moduleIdx].mode != MODULE_MODE_BIND) {
bindButton->check(false);
if (bindButton->checked()) {
bindButton->check(false);
this->invalidate();
}
}
#if defined(MULTIMODULE)
if (isModuleMultimodule(moduleIdx) &&
+5 -4
View File
@@ -183,11 +183,12 @@ inline uint8_t MODULE_CHANNELS_ROWS(int moduleIdx)
return 1;
else
return 0;
}
else if (isModuleDSM2(moduleIdx) || isModuleCrossfire(moduleIdx) || isModuleGhost(moduleIdx) || isModuleSBUS(moduleIdx)) {
} else if (isModuleDSM2(moduleIdx) || isModuleCrossfire(moduleIdx) ||
isModuleGhost(moduleIdx) || isModuleSBUS(moduleIdx) ||
isModuleDSMP(moduleIdx)) {
// fixed number of channels
return 0;
}
else {
} else {
return 1;
}
}