Add SBUS module parameters
This commit is contained in:
@@ -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());
|
getParent()->moveWindowsTop(top() + 1, adjustHeight());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -85,6 +85,7 @@ ISTR(ANTENNA_MODES);
|
|||||||
ISTR(SPORT_UPDATE_POWER_MODES);
|
ISTR(SPORT_UPDATE_POWER_MODES);
|
||||||
ISTR(CRSF_BAUDRATE);
|
ISTR(CRSF_BAUDRATE);
|
||||||
ISTR(PPM_POL);
|
ISTR(PPM_POL);
|
||||||
|
ISTR(SBUS_INVERSION_VALUES);
|
||||||
|
|
||||||
#if defined(PCBSKY9X) && defined(REVX)
|
#if defined(PCBSKY9X) && defined(REVX)
|
||||||
ISTR(VOUTPUT_TYPE);
|
ISTR(VOUTPUT_TYPE);
|
||||||
|
|||||||
@@ -165,6 +165,7 @@ extern const char STR_R9M_PXX2_RF_PROTOCOLS[];
|
|||||||
extern const char STR_DSM_PROTOCOLS[];
|
extern const char STR_DSM_PROTOCOLS[];
|
||||||
extern const char STR_CRSF_BAUDRATE[];
|
extern const char STR_CRSF_BAUDRATE[];
|
||||||
extern const char STR_PPM_POL[];
|
extern const char STR_PPM_POL[];
|
||||||
|
extern const char STR_SBUS_INVERSION_VALUES[];
|
||||||
|
|
||||||
extern const char STR_MULTI_PROTOCOLS[];
|
extern const char STR_MULTI_PROTOCOLS[];
|
||||||
extern const char STR_MULTI_POWER[];
|
extern const char STR_MULTI_POWER[];
|
||||||
|
|||||||
@@ -150,6 +150,9 @@
|
|||||||
#define LEN_PPM_POL "\001"
|
#define LEN_PPM_POL "\001"
|
||||||
#define TR_PPM_POL "+""-"
|
#define TR_PPM_POL "+""-"
|
||||||
|
|
||||||
|
#define LEN_SBUS_INVERSION_VALUES "\014"
|
||||||
|
#define TR_SBUS_INVERSION_VALUES "normal\0 ""not inverted"
|
||||||
|
|
||||||
#define TR_SENSOR_RSSI "RSSI"
|
#define TR_SENSOR_RSSI "RSSI"
|
||||||
#define TR_SENSOR_R9PW "R9PW"
|
#define TR_SENSOR_R9PW "R9PW"
|
||||||
#define TR_SENSOR_RAS "SWR"
|
#define TR_SENSOR_RAS "SWR"
|
||||||
|
|||||||
Reference in New Issue
Block a user