Introduce serial status
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include "multi_rfprotos.h"
|
||||
#include "io/multi_protolist.h"
|
||||
#include "pulses/flysky.h"
|
||||
#include "mixer_scheduler.h"
|
||||
|
||||
#include "opentx.h"
|
||||
#include "libopenui.h"
|
||||
@@ -610,16 +611,25 @@ class ModuleWindow : public FormGroup {
|
||||
// Module parameters
|
||||
if (moduleIdx== EXTERNAL_MODULE && isModuleCrossfire(moduleIdx)) {
|
||||
grid.nextLine();
|
||||
new StaticText(this, grid.getLabelSlot(true), STR_BAUDRATE, 0,COLOR_THEME_PRIMARY1);
|
||||
new Choice(this, grid.getFieldSlot(1, 0), STR_CRSF_BAUDRATE, 0,CROSSFIRE_MAX_INTERNAL_BAUDRATE,
|
||||
[=]() -> int {
|
||||
return CROSSFIRE_STORE_TO_INDEX(g_model.moduleData[moduleIdx].crsf.telemetryBaudrate);
|
||||
},
|
||||
[=](int newValue) {
|
||||
g_model.moduleData[moduleIdx].crsf.telemetryBaudrate = CROSSFIRE_INDEX_TO_STORE(newValue);
|
||||
SET_DIRTY();
|
||||
restartExternalModule();
|
||||
});
|
||||
new StaticText(this, grid.getLabelSlot(true), STR_BAUDRATE, 0, COLOR_THEME_PRIMARY1);
|
||||
new Choice(this, grid.getFieldSlot(1, 0), STR_CRSF_BAUDRATE, 0, CROSSFIRE_MAX_INTERNAL_BAUDRATE,
|
||||
[=]() -> int {
|
||||
return CROSSFIRE_STORE_TO_INDEX(g_model.moduleData[moduleIdx].crsf.telemetryBaudrate);
|
||||
},
|
||||
[=](int newValue) {
|
||||
g_model.moduleData[moduleIdx].crsf.telemetryBaudrate = CROSSFIRE_INDEX_TO_STORE(newValue);
|
||||
SET_DIRTY();
|
||||
restartExternalModule();
|
||||
});
|
||||
}
|
||||
if (isModuleCrossfire(moduleIdx)) {
|
||||
grid.nextLine();
|
||||
new StaticText(this, grid.getLabelSlot(true), STR_STATUS, 0,COLOR_THEME_PRIMARY1);
|
||||
new DynamicText(this, grid.getFieldSlot(), [=] {
|
||||
char msg[64] = "";
|
||||
sprintf(msg,"%d Hz %d Err", 1000000 / getMixerSchedulerPeriod(), telemetryErrors);
|
||||
return std::string(msg);
|
||||
});
|
||||
}
|
||||
if (isModuleXJT(moduleIdx)) {
|
||||
rfChoice = new Choice(
|
||||
|
||||
Reference in New Issue
Block a user