More compil fixes
This commit is contained in:
@@ -536,22 +536,12 @@ class ModuleWindow : public FormGroup {
|
|||||||
new StaticText(this, grid.getLabelSlot(true), STR_RF_PROTOCOL);
|
new StaticText(this, grid.getLabelSlot(true), STR_RF_PROTOCOL);
|
||||||
|
|
||||||
// Multi type (CUSTOM, brand A, brand B,...)
|
// Multi type (CUSTOM, brand A, brand B,...)
|
||||||
int multiRfProto = g_model.moduleData[moduleIdx].multi.customProto == 1 ? MODULE_SUBTYPE_MULTI_CUSTOM : g_model.moduleData[moduleIdx].getMultiProtocol(false);
|
int multiRfProto = g_model.moduleData[moduleIdx].getMultiProtocol();
|
||||||
rfChoice = new Choice(this, grid.getFieldSlot(g_model.moduleData[moduleIdx].multi.customProto ? 3 : 2, 0), STR_MULTI_PROTOCOLS, MODULE_SUBTYPE_MULTI_FIRST, MODULE_SUBTYPE_MULTI_LAST,
|
rfChoice = new Choice(this, grid.getFieldSlot(g_model.moduleData[moduleIdx].multi.customProto ? 3 : 2, 0), STR_MULTI_PROTOCOLS, MODULE_SUBTYPE_MULTI_FIRST, MODULE_SUBTYPE_MULTI_LAST,
|
||||||
GET_DEFAULT(multiRfProto),
|
GET_DEFAULT(multiRfProto),
|
||||||
[=](int32_t newValue) {
|
[=](int32_t newValue) {
|
||||||
g_model.moduleData[moduleIdx].multi.customProto = (newValue == MODULE_SUBTYPE_MULTI_CUSTOM);
|
g_model.moduleData[moduleIdx].setMultiProtocol(newValue);
|
||||||
if (!g_model.moduleData[moduleIdx].multi.customProto)
|
resetMultiProtocolsOptions(moduleIdx);
|
||||||
g_model.moduleData[moduleIdx].setMultiProtocol(newValue);
|
|
||||||
g_model.moduleData[moduleIdx].subType = 0;
|
|
||||||
// Sensible default for DSM2 (same as for ppm): 7ch@22ms + Autodetect settings enabled
|
|
||||||
if (g_model.moduleData[moduleIdx].getMultiProtocol(true) == MODULE_SUBTYPE_MULTI_DSM2) {
|
|
||||||
g_model.moduleData[moduleIdx].multi.autoBindMode = 1;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
g_model.moduleData[moduleIdx].multi.autoBindMode = 0;
|
|
||||||
}
|
|
||||||
g_model.moduleData[moduleIdx].multi.optionValue = 0;
|
|
||||||
SET_DIRTY();
|
SET_DIRTY();
|
||||||
update();
|
update();
|
||||||
rfChoice->setFocus();
|
rfChoice->setFocus();
|
||||||
@@ -560,7 +550,7 @@ class ModuleWindow : public FormGroup {
|
|||||||
if (g_model.moduleData[moduleIdx].multi.customProto) {
|
if (g_model.moduleData[moduleIdx].multi.customProto) {
|
||||||
// Proto column 1
|
// Proto column 1
|
||||||
new NumberEdit(this, grid.getFieldSlot(3, 1), 0, 63,
|
new NumberEdit(this, grid.getFieldSlot(3, 1), 0, 63,
|
||||||
GET_DEFAULT(g_model.moduleData[moduleIdx].getMultiProtocol(false)),
|
GET_DEFAULT(g_model.moduleData[moduleIdx].getMultiProtocol()),
|
||||||
[=](int32_t newValue) {
|
[=](int32_t newValue) {
|
||||||
g_model.moduleData[moduleIdx].setMultiProtocol(newValue);
|
g_model.moduleData[moduleIdx].setMultiProtocol(newValue);
|
||||||
SET_DIRTY();
|
SET_DIRTY();
|
||||||
@@ -571,7 +561,7 @@ class ModuleWindow : public FormGroup {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Subtype (D16, DSMX,...)
|
// Subtype (D16, DSMX,...)
|
||||||
const mm_protocol_definition * pdef = getMultiProtocolDefinition(g_model.moduleData[moduleIdx].getMultiProtocol(false));
|
const mm_protocol_definition * pdef = getMultiProtocolDefinition(g_model.moduleData[moduleIdx].getMultiProtocol());
|
||||||
if (pdef->maxSubtype > 0)
|
if (pdef->maxSubtype > 0)
|
||||||
new Choice(this, grid.getFieldSlot(2, 1), pdef->subTypeString, 0, pdef->maxSubtype,GET_SET_DEFAULT(g_model.moduleData[moduleIdx].subType));
|
new Choice(this, grid.getFieldSlot(2, 1), pdef->subTypeString, 0, pdef->maxSubtype,GET_SET_DEFAULT(g_model.moduleData[moduleIdx].subType));
|
||||||
}
|
}
|
||||||
@@ -593,7 +583,7 @@ class ModuleWindow : public FormGroup {
|
|||||||
}*/
|
}*/
|
||||||
|
|
||||||
// Multi optional feature row
|
// Multi optional feature row
|
||||||
const uint8_t multi_proto = g_model.moduleData[moduleIdx].getMultiProtocol(true);
|
const uint8_t multi_proto = g_model.moduleData[moduleIdx].getMultiProtocol();
|
||||||
const mm_protocol_definition *pdef = getMultiProtocolDefinition(multi_proto);
|
const mm_protocol_definition *pdef = getMultiProtocolDefinition(multi_proto);
|
||||||
if (pdef->optionsstr) {
|
if (pdef->optionsstr) {
|
||||||
grid.nextLine();
|
grid.nextLine();
|
||||||
@@ -614,7 +604,7 @@ class ModuleWindow : public FormGroup {
|
|||||||
|
|
||||||
// Bind on power up
|
// Bind on power up
|
||||||
grid.nextLine();
|
grid.nextLine();
|
||||||
new StaticText(this, grid.getLabelSlot(true),g_model.moduleData[moduleIdx].getMultiProtocol(true) == MODULE_SUBTYPE_MULTI_DSM2 ? STR_MULTI_DSM_AUTODTECT : STR_MULTI_AUTOBIND);
|
new StaticText(this, grid.getLabelSlot(true),g_model.moduleData[moduleIdx].getMultiProtocol() == MODULE_SUBTYPE_MULTI_DSM2 ? STR_MULTI_DSM_AUTODTECT : STR_MULTI_AUTOBIND);
|
||||||
new CheckBox(this, grid.getFieldSlot(), GET_SET_DEFAULT(g_model.moduleData[moduleIdx].multi.autoBindMode));
|
new CheckBox(this, grid.getFieldSlot(), GET_SET_DEFAULT(g_model.moduleData[moduleIdx].multi.autoBindMode));
|
||||||
|
|
||||||
// Low power mode
|
// Low power mode
|
||||||
|
|||||||
@@ -394,7 +394,7 @@ void ModelTelemetryPage::build(FormWindow * window, int8_t focusSensorIndex)
|
|||||||
|
|
||||||
// RSSI
|
// RSSI
|
||||||
if (g_model.moduleData[EXTERNAL_MODULE].type == MODULE_TYPE_MULTIMODULE &&
|
if (g_model.moduleData[EXTERNAL_MODULE].type == MODULE_TYPE_MULTIMODULE &&
|
||||||
g_model.moduleData[EXTERNAL_MODULE].getMultiProtocol(false) == MODULE_SUBTYPE_MULTI_FS_AFHDS2A)
|
g_model.moduleData[EXTERNAL_MODULE].getMultiProtocol() == MODULE_SUBTYPE_MULTI_FS_AFHDS2A)
|
||||||
new Subtitle(window, grid.getLineSlot(), "RSNR");
|
new Subtitle(window, grid.getLineSlot(), "RSNR");
|
||||||
else
|
else
|
||||||
new Subtitle(window, grid.getLineSlot(), "RSSI");
|
new Subtitle(window, grid.getLineSlot(), "RSSI");
|
||||||
|
|||||||
@@ -255,6 +255,22 @@ void RadioSetupPage::build(FormWindow * window)
|
|||||||
edit->setStep(10);
|
edit->setStep(10);
|
||||||
edit->setSuffix("Hz");
|
edit->setSuffix("Hz");
|
||||||
grid.nextLine();
|
grid.nextLine();
|
||||||
|
|
||||||
|
new StaticText(window, grid.getLabelSlot(true), STR_PITCH_AT_MAX);
|
||||||
|
edit = new NumberEdit(window, grid.getFieldSlot(), -80, 80,
|
||||||
|
GET_DEFAULT(VARIO_FREQUENCY_ZERO + (g_eeGeneral.varioPitch * 10) + VARIO_FREQUENCY_RANGE + (g_eeGeneral.varioRange * 10)),
|
||||||
|
SET_VALUE(g_eeGeneral.varioRange, (newValue - VARIO_FREQUENCY_ZERO - VARIO_FREQUENCY_RANGE) / 10 - g_eeGeneral.varioPitch );
|
||||||
|
edit->setStep(10);
|
||||||
|
edit->setSuffix("Hz");
|
||||||
|
grid.nextLine();
|
||||||
|
|
||||||
|
new StaticText(window, grid.getLabelSlot(true), STR_REPEAT_AT_ZERO);
|
||||||
|
edit = new NumberEdit(window, grid.getFieldSlot(), -30, 50,
|
||||||
|
GET_DEFAULT(VARIO_REPEAT_ZERO + (g_eeGeneral.varioRepeat * 10)),
|
||||||
|
SET_VALUE(g_eeGeneral.varioRepeat, (newValue - VARIO_REPEAT_ZERO) / 10));
|
||||||
|
edit->setStep(10);
|
||||||
|
edit->setSuffix("Ms");
|
||||||
|
grid.nextLine();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user