diff --git a/src/main/rx/fport.c b/src/main/rx/fport.c index 9b2bf72427..a6d455d0c9 100644 --- a/src/main/rx/fport.c +++ b/src/main/rx/fport.c @@ -254,15 +254,16 @@ static bool checkChecksum(uint8_t *data, uint8_t length) static uint8_t fportFrameStatus(rxRuntimeConfig_t *rxRuntimeConfig) { + static bool hasTelemetryRequest = false; + #ifdef USE_TELEMETRY_SMARTPORT static smartPortPayload_t payloadBuffer; + static bool rxDrivenFrameRate = false; + static uint8_t consecutiveTelemetryFrameCount = 0; #endif - static bool hasTelemetryRequest = false; uint8_t result = RX_FRAME_PENDING; - static bool rxDrivenFrameRate = false; - static uint8_t consecutiveTelemetryFrameCount = 0; if (rxBufferReadIndex != rxBufferWriteIndex) { uint8_t bufferLength = rxBuffer[rxBufferReadIndex].length; diff --git a/src/main/rx/sbus_channels.c b/src/main/rx/sbus_channels.c index 740d76a16c..531c9b2b5d 100644 --- a/src/main/rx/sbus_channels.c +++ b/src/main/rx/sbus_channels.c @@ -24,7 +24,7 @@ #include "platform.h" -#ifdef USE_SERIALRX_SBUS +#ifdef USE_SBUS_CHANNELS #include "common/utils.h" diff --git a/src/main/target/common_post.h b/src/main/target/common_post.h index 7adf0d6b63..a9c1c6ddfe 100644 --- a/src/main/target/common_post.h +++ b/src/main/target/common_post.h @@ -116,6 +116,10 @@ #undef USE_TELEMETRY_SRXL #endif +#if defined(USE_SERIALRX_SBUS) || defined(USE_SERIALRX_FPORT) +#define USE_SBUS_CHANNELS +#endif + #if !defined(USE_TELEMETRY_SMARTPORT) && !defined(USE_TELEMETRY_CRSF) #undef USE_MSP_OVER_TELEMETRY #endif