Multi module support for Taranis

Reuse some of the DSM2 routines to avoid code duplication.

This first version only implements the protocol on the Taranis. (and not

Telemetry code is currently untested and will not work (Polarity mismatch). The main protocols to use telemetry are FrSky protocols and not a high priority on the Taranis.

Patch v3: Fix myeeprom.h, include option value in menu.
Patch v4: Fix identing, name substructs of modeldata
This commit is contained in:
Arne Schwabe
2016-03-29 21:41:14 +02:00
parent c788ad6add
commit 119e413a6d
13 changed files with 458 additions and 26 deletions
+20
View File
@@ -64,6 +64,11 @@ void setupPulses(unsigned int port)
case MODULE_TYPE_XJT:
required_protocol = PROTO_PXX;
break;
#if defined(MULTIMODULE)
case MODULE_TYPE_MULTIMODULE:
required_protocol = PROTO_MULTIMODULE;
break;
#endif
#if defined(PCBTARANIS) && defined(DSM2)
case MODULE_TYPE_DSM2:
required_protocol = limit<uint8_t>(PROTO_DSM2_LP45, PROTO_DSM2_LP45+g_model.moduleData[EXTERNAL_MODULE].rfProtocol, PROTO_DSM2_DSMX);
@@ -123,6 +128,11 @@ void setupPulses(unsigned int port)
case PROTO_CROSSFIRE:
disable_crossfire(port);
break;
#endif
#if defined(MULTIMODULE)
case PROTO_MULTIMODULE:
disable_dsm2(port);
break;
#endif
case PROTO_PPM:
disable_ppm(port);
@@ -149,6 +159,11 @@ void setupPulses(unsigned int port)
case PROTO_CROSSFIRE:
init_crossfire(port);
break;
#endif
#if defined(MULTIMODULE)
case PROTO_MULTIMODULE:
init_dsm2(port);
break;
#endif
case PROTO_PPM:
init_ppm(port);
@@ -182,6 +197,11 @@ void setupPulses(unsigned int port)
}
break;
}
#endif
#if defined(MULTIMODULE)
case PROTO_MULTIMODULE:
setupPulsesMultimodule(port);
break;
#endif
case PROTO_PPM:
setupPulsesPPM(port);