Prevent AFHDS2A from being used as an external module

The pulses code for that module does not support it.
This commit is contained in:
Raphael Coeffic
2021-09-19 16:17:47 +02:00
parent f7214862e4
commit 4a79480e5e
+6 -2
View File
@@ -849,13 +849,17 @@ class ModuleWindow : public FormGroup {
update();
rfChoice->setFocus(SET_FOCUS_DEFAULT);
});
#if defined(PCBNV14)
if (moduleIdx == INTERNAL_MODULE) {
g_model.moduleData[moduleIdx].subType = FLYSKY_SUBTYPE_AFHDS2A;
rfChoice->setAvailableHandler(
[](int v) { return v == FLYSKY_SUBTYPE_AFHDS2A; });
} else {
g_model.moduleData[moduleIdx].subType = FLYSKY_SUBTYPE_AFHDS3;
rfChoice->setAvailableHandler(
[](int v) { return v == FLYSKY_SUBTYPE_AFHDS3; });
}
#endif
// RX options:
grid.nextLine();
new StaticText(this, grid.getLabelSlot(true), STR_OPTIONS, 0,