Use PROTOCOL_TELEMETRY_MULTIMODULE for internal multi when available (#7147)

* Use PROTOCOL_TELEMETRY_MULTIMODULE for internal multi when available

* Fix subprotocol sometime not shown
This fixes #7153
This commit is contained in:
3djc
2019-12-06 16:38:12 +01:00
committed by Bertrand Songis
parent 7a8e0dcccd
commit fdc154c5ae
2 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -1072,7 +1072,7 @@ bool menuModelSetup(event_t event)
else if (isModuleMultimodule(moduleIdx)) {
int multi_rfProto = g_model.moduleData[moduleIdx].getMultiProtocol();
lcdDrawMultiProtocolString(MODEL_SETUP_3RD_COLUMN, y, moduleIdx, multi_rfProto, menuHorizontalPosition == 1 ? attr : 0);
if (MULTIMODULE_HAS_SUBTYPE(EXTERNAL_MODULE))
if (MULTIMODULE_HAS_SUBTYPE(moduleIdx))
lcdDrawMultiSubProtocolString(MODEL_SETUP_4TH_COLUMN, y, moduleIdx, g_model.moduleData[moduleIdx].subType, menuHorizontalPosition==2 ? attr : 0);
}
#endif
+5
View File
@@ -147,6 +147,11 @@ inline uint8_t modelTelemetryProtocol()
if (!sportUsed && g_model.moduleData[EXTERNAL_MODULE].type == MODULE_TYPE_MULTIMODULE) {
return PROTOCOL_TELEMETRY_MULTIMODULE;
}
#if defined(INTERNAL_MODULE_MULTI)
if (g_model.moduleData[INTERNAL_MODULE].type == MODULE_TYPE_MULTIMODULE) {
return PROTOCOL_TELEMETRY_MULTIMODULE;
}
#endif
#endif
// default choice
return PROTOCOL_TELEMETRY_FRSKY_SPORT;