Better support for R9M EU (#5487)
* POC for X9, requires -DBINDING_OPTIONS=YES * There are apparently 4 valid choices * - make BINDING_OPTIONS part of standard code - adapt R9M EU LBT dialog to choice on bind * - remove option from Companion - cosmetics * Compilation fixes
This commit is contained in:
@@ -178,7 +178,7 @@ enum MenuModelSetupItems {
|
||||
#define MODEL_SETUP_MAX_LINES ((IS_PPM_PROTOCOL(protocol)||IS_DSM2_PROTOCOL(protocol)||IS_PXX_PROTOCOL(protocol)) ? HEADER_LINE+ITEM_MODEL_SETUP_MAX : HEADER_LINE+ITEM_MODEL_SETUP_MAX-1)
|
||||
#endif
|
||||
|
||||
#if defined(BINDING_OPTIONS)
|
||||
#if defined(PCBTARANIS)
|
||||
void onBindMenu(const char * result)
|
||||
{
|
||||
uint8_t moduleIdx = CURRENT_MODULE_EDITED(menuVerticalPosition);
|
||||
@@ -227,6 +227,7 @@ void onBindMenu(const char * result)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
void menuModelSetup(event_t event)
|
||||
{
|
||||
#if defined(PCBX7)
|
||||
@@ -1014,7 +1015,7 @@ void menuModelSetup(event_t event)
|
||||
s_editMode=0;
|
||||
}
|
||||
#endif
|
||||
#if defined(BINDING_OPTIONS)
|
||||
#if defined(PCBTARANIS)
|
||||
if (attr && l_posHorz > 0) {
|
||||
if (s_editMode > 0) {
|
||||
if (l_posHorz == 1) {
|
||||
@@ -1065,7 +1066,6 @@ void menuModelSetup(event_t event)
|
||||
newFlag = MODULE_RANGECHECK;
|
||||
}
|
||||
#endif
|
||||
|
||||
moduleFlag[moduleIdx] = newFlag;
|
||||
|
||||
#if defined(MULTIMODULE)
|
||||
@@ -1151,7 +1151,7 @@ void menuModelSetup(event_t event)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (IS_MODULE_R9M(moduleIdx)) {
|
||||
if (IS_MODULE_R9M_FCC(moduleIdx)) {
|
||||
if (IS_TELEMETRY_INTERNAL_MODULE()) {
|
||||
lcdDrawTextAlignedLeft(y, STR_MODULE_TELEMETRY);
|
||||
lcdDrawText(MODEL_SETUP_2ND_COLUMN, y, STR_DISABLE_INTERNAL);
|
||||
@@ -1160,6 +1160,16 @@ void menuModelSetup(event_t event)
|
||||
g_model.moduleData[moduleIdx].pxx.sport_out = editCheckBox(g_model.moduleData[EXTERNAL_MODULE].pxx.sport_out, MODEL_SETUP_2ND_COLUMN, y, STR_MODULE_TELEMETRY, attr, event);
|
||||
}
|
||||
}
|
||||
else if (IS_MODULE_R9M_LBT(moduleIdx)) {
|
||||
if (IS_TELEMETRY_INTERNAL_MODULE()) {
|
||||
lcdDrawTextAlignedLeft(y, STR_MODULE_TELEMETRY);
|
||||
lcdDrawText(MODEL_SETUP_2ND_COLUMN, y, STR_DISABLE_INTERNAL);
|
||||
}
|
||||
else {
|
||||
lcdDrawTextAlignedLeft(y, STR_MODULE_TELEMETRY);
|
||||
lcdDrawText(MODEL_SETUP_2ND_COLUMN, y, STR_BINDING_OPTION);
|
||||
}
|
||||
}
|
||||
else if (IS_MODULE_SBUS(moduleIdx)) {
|
||||
lcdDrawTextAlignedLeft(y, STR_WARN_BATTVOLTAGE);
|
||||
putsVolts(lcdLastRightPos, y, getBatteryVoltage(), attr | PREC2 | LEFT);
|
||||
|
||||
Reference in New Issue
Block a user