Rework DSM2/X support, auto protocol selection for DSM2

Support more than 31 protocols for the multi module. Breaks existing multi eeproms, need to reselect protocols
This commit is contained in:
Arne Schwabe
2016-10-16 22:17:38 +02:00
parent c592fed9f1
commit c055e93247
23 changed files with 198 additions and 182 deletions
+2 -2
View File
@@ -147,9 +147,9 @@ inline uint8_t modelTelemetryProtocol()
#if defined(MULTIMODULE)
if (g_model.moduleData[INTERNAL_MODULE].rfProtocol == RF_PROTO_OFF && g_model.moduleData[EXTERNAL_MODULE].type == MODULE_TYPE_MULTIMODULE) {
if (g_model.moduleData[EXTERNAL_MODULE].multi.rfProtocol == MM_RF_PROTO_DSM2)
if (g_model.moduleData[EXTERNAL_MODULE].getMultiProtocol() == MM_RF_PROTO_DSM2)
return PROTOCOL_SPEKTRUM;
else if ((g_model.moduleData[EXTERNAL_MODULE].multi.rfProtocol == MM_RF_PROTO_FRSKY) &&
else if ((g_model.moduleData[EXTERNAL_MODULE].getMultiProtocol() == MM_RF_PROTO_FRSKY) &&
(g_model.moduleData[EXTERNAL_MODULE].subType == MM_RF_FRSKY_SUBTYPE_D16 || g_model.moduleData[EXTERNAL_MODULE].subType == MM_RF_FRSKY_SUBTYPE_D16_8CH))
return PROTOCOL_FRSKY_SPORT;
else