Schwabe/multi telemetry (#4151)

* Add FY805 protocol

* Fix stray space

* Fix multi sending 120% instead of 100%.

* Implement a custom telemetry for the multi module

The custom telemetry allows the module to tell the telemetry protocol to OpenTX and also allows signaling the status of the Module (e.g. invalid protocol) to OpenTX

This should also close #3979.

* Cosmetics and a few small bugfixes

* remove empty if

* Move status line directly below the mode to be always visible when selecting a protocol

* warn if internal RF module is on

* Replace sprint with small helper function to build on AVR ARM (AR9X, 9XPRO, …)

* TR in wrong order, RF_PROTO_OFF inverted

* Refactor definition of Multimodule protocols to have one central place to define all multi protocol properties

* Also update protocols in companion

* Update multi version number to display as a.b.c.d
This commit is contained in:
Arne Schwabe
2016-12-24 00:04:11 +01:00
committed by Bertrand Songis
parent d1ef22ee47
commit 06b0694f03
37 changed files with 888 additions and 423 deletions
+9 -4
View File
@@ -74,10 +74,12 @@ void processTelemetryData(uint8_t data)
if (telemetryProtocol == PROTOCOL_SPEKTRUM) {
processSpektrumTelemetryData(data);
return;
}
else if (telemetryProtocol == PROTOCOL_FLYSKY_IBUS) {
} else if (telemetryProtocol == PROTOCOL_FLYSKY_IBUS) {
processFlySkyTelemetryData(data);
return;
} else if (telemetryProtocol == PROTOCOL_MULTIMODULE) {
processMultiTelemetryData(data);
return;
}
#endif
processFrskyTelemetryData(data);
@@ -411,10 +413,13 @@ void telemetryReset()
// we don't reset the telemetry here as we would also reset the consumption after model load
void telemetryInit(uint8_t protocol) {
#if defined(MULTIMODULE)
// TODO: Is there a better way to communicate this to this function?
if (!IS_TELEMETRY_INTERNAL_MODULE && g_model.moduleData[EXTERNAL_MODULE].type == MODULE_TYPE_MULTIMODULE) {
if (protocol == PROTOCOL_MULTIMODULE || protocol == PROTOCOL_FLYSKY_IBUS) {
// The DIY Multi module always speaks 100000 baud regardless of the telemetry protocol in use
telemetryPortInit(MULTIMODULE_BAUDRATE, TELEMETRY_SERIAL_8E2);
} else if (protocol == PROTOCOL_SPEKTRUM)
{
// Spektrum's own small race RX (SPM4648) uses 125000 8N1, use the same since there is no real standard
telemetryPortInit(125000, TELEMETRY_SERIAL_8N1);
} else
#endif
if (protocol == PROTOCOL_FRSKY_D) {