1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-24 00:35:18 +03:00

Schwabe/multimodule 9x (#3676)

* Fix Multimodule showing up as Crossfire when only multimode and not crossfire is enabled.

* Don't hardcode telemetry to be Frysky on non STM32 arm targets

* Port multi module code to 9X platforms

* Allow Spektrum telemetry protocol to be selected as protocol for the telemetry selection

* Fix infinite loop in spektrum code

* Fix cosmetics

Changes also done for Horus and Taranis UI where appropriate
This commit is contained in:
Arne Schwabe 2016-08-02 18:21:18 +02:00 committed by Bertrand Songis
parent d0527be2c4
commit 0b67d412a0
26 changed files with 392 additions and 115 deletions

View file

@ -57,6 +57,11 @@ lcdint_t applyChannelRatio(source_t channel, lcdint_t val)
#endif
#if defined(CPUSTM32)
#define IS_TELEMETRY_INTERNAL_MODULE (g_model.moduleData[INTERNAL_MODULE].rfProtocol != RF_PROTO_OFF)
#else
#define IS_TELEMETRY_INTERNAL_MODULE (false)
#endif
#if defined(CPUARM)
void processTelemetryData(uint8_t data)
{
#if defined(CROSSFIRE)
@ -109,7 +114,7 @@ void telemetryWakeup()
}
else {
// Receive serial data here
rxPdcUsart(processFrskyTelemetryData);
rxPdcUsart(processTelemetryData);
}
#endif
@ -406,7 +411,7 @@ void telemetryReset()
void telemetryInit(uint8_t protocol) {
#if defined(MULTIMODULE)
// TODO: Is there a better way to communicate this to this function?
if (g_model.moduleData[INTERNAL_MODULE].rfProtocol == RF_PROTO_OFF && g_model.moduleData[EXTERNAL_MODULE].type == MODULE_TYPE_MULTIMODULE) {
if (!IS_TELEMETRY_INTERNAL_MODULE && g_model.moduleData[EXTERNAL_MODULE].type == MODULE_TYPE_MULTIMODULE) {
// The DIY Multi module always speaks 100000 baud regardless of the telemetry protocol in use
telemetryPortInit(MULTIMODULE_BAUDRATE, TELEMETRY_SERIAL_8E2);
} else