Implement SBUS output for external module bay. (#5225)

* Implement SBUS output for external module bay.

* Bugfixes and Companion support
This commit is contained in:
Arne Schwabe
2017-09-29 18:29:39 +02:00
committed by Bertrand Songis
parent 710e6ddc4c
commit fd782538d8
39 changed files with 367 additions and 150 deletions
+14 -4
View File
@@ -65,6 +65,9 @@ uint8_t getRequiredProtocol(uint8_t port)
case MODULE_TYPE_R9M:
required_protocol = PROTO_PXX;
break;
case MODULE_TYPE_SBUS:
required_protocol = PROTO_SBUS;
break;
#if defined(MULTIMODULE)
case MODULE_TYPE_MULTIMODULE:
required_protocol = PROTO_MULTIMODULE;
@@ -145,9 +148,10 @@ void setupPulses(uint8_t port)
#if defined(MULTIMODULE)
case PROTO_MULTIMODULE:
disable_multimodule(port);
break;
#endif
case PROTO_SBUS:
disable_sbusOut(port);
break;
case PROTO_PPM:
disable_ppm(port);
@@ -166,6 +170,10 @@ void setupPulses(uint8_t port)
setupPulsesPXX(port);
scheduleNextMixerCalculation(port, 9);
break;
case PROTO_SBUS:
setupPulsesSbus(port);
scheduleNextMixerCalculation(port, (45+g_model.moduleData[port].sbus.refreshRate)/2);
break;
#if defined(DSM2)
case PROTO_DSM2_LP45:
@@ -240,9 +248,11 @@ void setupPulses(uint8_t port)
#if defined(MULTIMODULE)
case PROTO_MULTIMODULE:
init_multimodule(port);
break;
#endif
case PROTO_SBUS:
init_sbusOut(port);
break;
case PROTO_PPM:
init_ppm(port);