Multiprotocol working on sky9x and co (#4409)

* MULTI working on sky9x

* Fix crash with module OFF

* Cosmetics

* Compilation fix / cosmetics

* Typo....

* Multi now available on all ARM platforms

* Does this help?

* Compilation fix
This commit is contained in:
Andre Bernet
2017-02-15 17:31:38 +01:00
committed by GitHub
parent e8b04cdee6
commit fe49fb5442
15 changed files with 145 additions and 50 deletions
+3 -6
View File
@@ -139,7 +139,7 @@ extern uint8_t telemetryProtocol;
#define IS_FRSKY_SPORT_PROTOCOL() (false)
#endif
#if defined(PCBTARANIS) || defined(PCBHORUS)
#if defined(CPUARM)
inline uint8_t modelTelemetryProtocol()
{
#if defined(CROSSFIRE)
@@ -148,12 +148,12 @@ inline uint8_t modelTelemetryProtocol()
}
#endif
if (g_model.moduleData[INTERNAL_MODULE].rfProtocol == RF_PROTO_OFF && g_model.moduleData[EXTERNAL_MODULE].type == MODULE_TYPE_PPM) {
if (!IS_INTERNAL_MODULE_ENABLED() && g_model.moduleData[EXTERNAL_MODULE].type == MODULE_TYPE_PPM) {
return g_model.telemetryProtocol;
}
#if defined(MULTIMODULE)
if (g_model.moduleData[INTERNAL_MODULE].rfProtocol == RF_PROTO_OFF && g_model.moduleData[EXTERNAL_MODULE].type == MODULE_TYPE_MULTIMODULE) {
if (!IS_INTERNAL_MODULE_ENABLED() && g_model.moduleData[EXTERNAL_MODULE].type == MODULE_TYPE_MULTIMODULE) {
return PROTOCOL_MULTIMODULE;
}
#endif
@@ -161,9 +161,6 @@ inline uint8_t modelTelemetryProtocol()
// default choice
return PROTOCOL_FRSKY_SPORT;
}
#define MODEL_TELEMETRY_PROTOCOL() modelTelemetryProtocol()
#elif defined(CPUARM)
#define MODEL_TELEMETRY_PROTOCOL() g_model.telemetryProtocol
#endif
#if defined(CPUARM)