1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 12:25:20 +03:00

Merge pull request #6997 from mikeller/fix_fport_conditionals

Fixed build errors when building with USE_SERIALRX_FPORT but without USE_SERIALRX_SBUS or USE_TELEMETRY_SMARTPORT.
This commit is contained in:
Michael Keller 2018-10-29 22:09:37 +13:00 committed by GitHub
commit b0705caf6a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 4 deletions

View file

@ -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;

View file

@ -24,7 +24,7 @@
#include "platform.h"
#ifdef USE_SERIALRX_SBUS
#ifdef USE_SBUS_CHANNELS
#include "common/utils.h"

View file

@ -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