Fix compilation with MULTIMODULE=NO

And allow for Spektrum telemetry to stay enabled (needed for DSMP module).
This commit is contained in:
Raphael Coeffic
2022-07-22 20:45:04 +10:00
committed by Peter Feerick
parent 59466b1978
commit 8379b47e2b
29 changed files with 204 additions and 58 deletions
+2
View File
@@ -27,6 +27,8 @@
#include "intmodule_serial_driver.h"
#endif
#include "telemetry/crossfire.h"
#define CROSSFIRE_CH_BITS 11
#define CROSSFIRE_CENTER 0x3E0
#if defined(PPM_CENTER_ADJUSTABLE)
+2
View File
@@ -20,6 +20,8 @@
*/
#include "opentx.h"
#include "telemetry/ghost.h"
#include "telemetry/ghost_menu.h"
uint8_t createGhostMenuControlFrame(uint8_t * frame, int16_t * pulses)
{
+7 -3
View File
@@ -40,6 +40,10 @@
#include "pulses/crossfire.h"
#endif
#if defined(GHOST)
#include "telemetry/ghost.h"
#endif
#if defined(MULTIMODULE)
#include "io/multi_protolist.h"
#include "pulses/multi.h"
@@ -388,14 +392,14 @@ static void enablePulsesInternalModule(uint8_t protocol)
break;
#endif
#if defined(INTERNAL_MODULE_MULTI)
#if defined(INTERNAL_MODULE_MULTI) && defined(MULTIMODULE)
case PROTOCOL_CHANNELS_MULTIMODULE:
internalModuleContext = MultiInternalDriver.init(INTERNAL_MODULE);
internalModuleDriver = &MultiInternalDriver;
break;
#endif
#if defined(INTERNAL_MODULE_CRSF)
#if defined(INTERNAL_MODULE_CRSF) && defined(CROSSFIRE)
case PROTOCOL_CHANNELS_CROSSFIRE:
internalModuleContext = CrossfireInternalDriver.init(INTERNAL_MODULE);
internalModuleDriver = &CrossfireInternalDriver;
@@ -409,7 +413,7 @@ static void enablePulsesInternalModule(uint8_t protocol)
break;
#endif
#if defined(INTERNAL_MODULE_AFHDS2A)
#if defined(INTERNAL_MODULE_AFHDS2A) && defined(AFHDS2A)
case PROTOCOL_CHANNELS_AFHDS2A:
internalModuleContext = Afhds2InternalDriver.init(INTERNAL_MODULE);
internalModuleDriver = &Afhds2InternalDriver;