Add SBUS module parameters

This commit is contained in:
3djc
2020-10-08 12:01:21 +02:00
parent 7512e8a2cf
commit 9a4be580c2
4 changed files with 21 additions and 0 deletions
+16
View File
@@ -893,6 +893,22 @@ class ModuleWindow : public FormGroup {
}
}
// SBUS refresh rate
if (isModuleSBUS(moduleIdx)) {
new StaticText(this, grid.getLabelSlot(true), STR_REFRESHRATE);
auto edit = new NumberEdit(this, grid.getFieldSlot(2, 0), 60, 400,
GET_DEFAULT((int16_t)g_model.moduleData[moduleIdx].ppm.frameLength*5 + 225),
SET_VALUE(g_model.moduleData[moduleIdx].ppm.frameLength, (newValue - 225)/5),
0, PREC1);
edit->setSuffix(STR_MS);
new Choice(this, grid.getFieldSlot(2, 1), STR_SBUS_INVERSION_VALUES, 0, 1, GET_SET_DEFAULT(g_model.moduleData[moduleIdx].sbus.noninverted));
#if defined(RADIO_TX16S)
grid.nextLine();
new StaticText(this, grid.getFieldSlot(1, 0), STR_WARN_5VOLTS);
#endif
grid.nextLine();
}
getParent()->moveWindowsTop(top() + 1, adjustHeight());
}
};