Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce min rx packet interval to 22ms #21

Open
wants to merge 15 commits into
base: Reduce-min-Rx-packet-interval-to-22ms
Choose a base branch
from
Open
2 changes: 1 addition & 1 deletion src/main/fc/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ bool processRx(timeUs_t currentTimeUs)
return false;
}

updateRcRefreshRate(currentTimeUs);
updateRcRefreshRate(currentTimeUs, rxIsReceivingSignal());

// in 3D mode, we need to be able to disarm by switch at any time
if (featureIsEnabled(FEATURE_3D)) {
Expand Down
52 changes: 35 additions & 17 deletions src/main/fc/rc.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ static bool reverseMotors = false;
static applyRatesFn *applyRates;

static uint16_t currentRxIntervalUs; // packet interval in microseconds
static float currentRxRateHz; // packet rate in hertz

static bool isRxDataNew = false;
static bool isRxIntervalValid = false;
Expand Down Expand Up @@ -261,25 +260,43 @@ static void scaleRawSetpointToFpvCamAngle(void)
rawSetpoint[YAW] = constrainf(yaw * cosFactor + roll * sinFactor, SETPOINT_RATE_LIMIT_MIN, SETPOINT_RATE_LIMIT_MAX);
}

void updateRcRefreshRate(timeUs_t currentTimeUs)
void updateRcRefreshRate(timeUs_t currentTimeUs, bool newDataReceived)
{
static timeUs_t lastRxTimeUs;
// this function runs whenever a new frame is detected (newDataReceived == true),
// and after RXLOSS_TRIGGER_INTERVAL since the last good frame, and
// then every RX_FRAME_CHECK_INTERVAL, until a new frame is detected
// (newDataReceived == false)

timeDelta_t frameAgeUs;
timeDelta_t frameDeltaUs = rxGetFrameDelta(&frameAgeUs);
// it provides values for use in RCSmoothing, Feedforward, etc.

if (!frameDeltaUs || cmpTimeUs(currentTimeUs, lastRxTimeUs) <= frameAgeUs) {
frameDeltaUs = cmpTimeUs(currentTimeUs, lastRxTimeUs);
}
static timeUs_t lastRxTimeUs = 0;
timeDelta_t delta = 0;
if (newDataReceived) {
// use driver rx time if available, current time otherwise
const timeUs_t rxTime = rxRuntimeState.lastRcFrameTimeUs ? rxRuntimeState.lastRcFrameTimeUs : currentTimeUs;

DEBUG_SET(DEBUG_RX_TIMING, 0, MIN(frameDeltaUs / 10, INT16_MAX));
DEBUG_SET(DEBUG_RX_TIMING, 1, MIN(frameAgeUs / 10, INT16_MAX));
if (lastRxTimeUs) { // report delta only if previous time is available
delta = cmpTimeUs(rxTime, lastRxTimeUs);
}
lastRxTimeUs = rxTime;
} else {
if (lastRxTimeUs) {
// no packet received, use current time for delta
delta = cmpTimeUs(currentTimeUs, lastRxTimeUs);
}
}
// temporary debugs
DEBUG_SET(DEBUG_RX_TIMING, 4, MIN(delta / 10, INT16_MAX)); // time between frames based on rxFrameCheck
#ifdef USE_RX_LINK_QUALITY_INFO
DEBUG_SET(DEBUG_RX_TIMING, 6, rxGetLinkQualityPercent()); // raw link quality value
#endif
DEBUG_SET(DEBUG_RX_TIMING, 7, rxIsReceivingSignal()); // flag to initiate RXLOSS signal and Stage 1 values

lastRxTimeUs = currentTimeUs;
currentRxIntervalUs = constrain(frameDeltaUs, RX_INTERVAL_MIN_US, RX_INTERVAL_MAX_US);
isRxIntervalValid = frameDeltaUs == currentRxIntervalUs;
// constrain to a frequency range no lower than about 15Hz and up to about 1000Hz
currentRxIntervalUs = constrain(delta, RX_INTERVAL_MIN_US, RX_INTERVAL_MAX_US);
isRxIntervalValid = delta == currentRxIntervalUs;

currentRxRateHz = 1e6f / currentRxIntervalUs; // cannot be zero due to preceding constraint
DEBUG_SET(DEBUG_RX_TIMING, 0, MIN(delta / 10, INT16_MAX)); // output value in hundredths of ms
DEBUG_SET(DEBUG_RX_TIMING, 2, isRxIntervalValid);
DEBUG_SET(DEBUG_RX_TIMING, 3, MIN(currentRxIntervalUs / 10, INT16_MAX));
}
Expand Down Expand Up @@ -420,11 +437,12 @@ static FAST_CODE void processRcSmoothingFilter(void)
// by using interval here, we catch a dropout/telemetry where the inteval increases by 100%, but accept
// the return to normal value, which is only 50% different from the 100% interval of a single drop, and 66% of a return after a double drop.
static float prevRxRateHz;
float rxRateHz = 1e6f / currentRxIntervalUs; // isRxIntervalValid == true
// smooth the current Rx link frequency estimates
const float kF = 0.1f; // first order lowpass smoothing filter coefficient
const float smoothedRxRateHz = prevRxRateHz + kF * (currentRxRateHz - prevRxRateHz);
const float smoothedRxRateHz = prevRxRateHz + kF * (rxRateHz - prevRxRateHz);
prevRxRateHz = smoothedRxRateHz;

// recalculate cutoffs every 3 acceptable samples
if (rcSmoothingData.sampleCount) {
rcSmoothingData.sampleCount --;
Expand Down Expand Up @@ -499,7 +517,7 @@ NOINLINE void initAveraging(uint16_t feedforwardAveraging)
FAST_CODE_NOINLINE void calculateFeedforward(const pidRuntime_t *pid, int axis)
{
const float rxInterval = currentRxIntervalUs * 1e-6f; // seconds
float rxRate = currentRxRateHz;
float rxRate = 1.0f / rxInterval;
static float prevRxInterval;

static float prevRcCommand[3];
Expand Down
2 changes: 1 addition & 1 deletion src/main/fc/rc.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ bool rcSmoothingInitializationComplete(void);
float getMaxRcRate(int axis);
float getFeedforward(int axis);

void updateRcRefreshRate(timeUs_t currentTimeUs);
void updateRcRefreshRate(timeUs_t currentTimeUs, bool newDataReceived);
uint16_t getCurrentRxIntervalUs(void);
bool getRxRateValid(void);
2 changes: 1 addition & 1 deletion src/main/fc/tasks.c
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ task_attribute_t task_attributes[TASK_COUNT] = {
[TASK_ATTITUDE] = DEFINE_TASK("ATTITUDE", NULL, NULL, imuUpdateAttitude, TASK_PERIOD_HZ(100), TASK_PRIORITY_MEDIUM),
#endif

[TASK_RX] = DEFINE_TASK("RX", NULL, rxUpdateCheck, taskUpdateRxMain, TASK_PERIOD_HZ(33), TASK_PRIORITY_HIGH), // If event-based scheduling doesn't work, fallback to periodic scheduling
[TASK_RX] = DEFINE_TASK("RX", NULL, rxUpdateCheck, taskUpdateRxMain, TASK_PERIOD_HZ(22), TASK_PRIORITY_HIGH), // If event-based scheduling doesn't work, fallback to periodic scheduling
[TASK_DISPATCH] = DEFINE_TASK("DISPATCH", NULL, NULL, dispatchProcess, TASK_PERIOD_HZ(1000), TASK_PRIORITY_HIGH),

#ifdef USE_BEEPER
Expand Down
8 changes: 4 additions & 4 deletions src/main/flight/failsafe.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ static bool failsafeShouldHaveCausedLandingByNow(void)
bool failsafeIsReceivingRxData(void)
{
return (failsafeState.rxLinkState == FAILSAFE_RXLINK_UP);
// False with BOXFAILSAFE switch or when no valid packets for 100ms or any flight channel invalid for 300ms,
// False with BOXFAILSAFE switch or when no valid packets for RXLOSS_TRIGGER_INTERVAL or any flight channel invalid for 300ms,
// becomes true immediately BOXFAILSAFE switch reverts, or after recovery period expires when valid packets are received
// rxLinkState RXLINK_DOWN (not up) is the trigger for the various failsafe stage 2 outcomes.
}
Expand Down Expand Up @@ -184,7 +184,7 @@ void failsafeOnValidDataReceived(void)

if (cmp32(failsafeState.validRxDataReceivedAt, failsafeState.validRxDataFailedAt) > (int32_t)failsafeState.receivingRxDataPeriodPreset) {
// receivingRxDataPeriodPreset is rxDataRecoveryPeriod unless set to zero to allow immediate control recovery after switch induced failsafe
// rxDataRecoveryPeriod defaults to 1.0s with minimum of PERIOD_RXDATA_RECOVERY (200ms)
// rxDataRecoveryPeriod defaults to 1.0s with minimum of PERIOD_RXDATA_RECOVERY (100ms)
// link is not considered 'up', after it has been 'down', until that recovery period has expired
failsafeState.rxLinkState = FAILSAFE_RXLINK_UP;
// after the rxDataRecoveryPeriod, typically 1s after receiving valid data, clear RXLOSS in OSD and permit arming
Expand All @@ -193,11 +193,11 @@ void failsafeOnValidDataReceived(void)
}

void failsafeOnValidDataFailed(void)
// run from rc.c when packets are lost for more than the signal validation period (100ms), or immediately BOXFAILSAFE switch is active
// run from rc.c when packets are lost for more than RXLOSS_TRIGGER_INTERVAL, or immediately BOXFAILSAFE switch is active
// after the stage 1 delay has expired, sets the rxLinkState to RXLINK_DOWN, ie not up, causing failsafeIsReceivingRxData to become false
// if failsafe is configured to go direct to stage 2, this is emulated immediately in failsafeUpdateState()
{
// set RXLOSS in OSD and block arming after 100ms of signal loss
// set RXLOSS in OSD and block arming after RXLOSS_TRIGGER_INTERVAL of frame loss
setArmingDisabled(ARMING_DISABLED_RX_FAILSAFE);

failsafeState.validRxDataFailedAt = millis();
Expand Down
2 changes: 1 addition & 1 deletion src/main/rx/cc2500_frsky_x.c
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ rx_spi_received_e frSkyXHandlePacket(uint8_t * const packet, uint8_t * const pro

#if defined(USE_TELEMETRY_SMARTPORT)
if (telemetryEnabled) {
ret |= RX_SPI_ROCESSING_REQUIRED;
ret |= RX_SPI_PROCESSING_REQUIRED;
}
#endif
*protocolState = STATE_RESUME;
Expand Down
1 change: 0 additions & 1 deletion src/main/rx/crsf.c
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,6 @@ bool crsfRxInit(const rxConfig_t *rxConfig, rxRuntimeState_t *rxRuntimeState)
rxRuntimeState->channelCount = CRSF_MAX_CHANNEL;
rxRuntimeState->rcReadRawFn = crsfReadRawRC;
rxRuntimeState->rcFrameStatusFn = crsfFrameStatus;
rxRuntimeState->rcFrameTimeUsFn = rxFrameTimeUs;

const serialPortConfig_t *portConfig = findSerialPortConfig(FUNCTION_RX_SERIAL);
if (!portConfig) {
Expand Down
1 change: 0 additions & 1 deletion src/main/rx/fport.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,6 @@ bool fportRxInit(const rxConfig_t *rxConfig, rxRuntimeState_t *rxRuntimeState)
rxRuntimeState->channelCount = SBUS_MAX_CHANNEL;
rxRuntimeState->rcFrameStatusFn = fportFrameStatus;
rxRuntimeState->rcProcessFrameFn = fportProcessFrame;
rxRuntimeState->rcFrameTimeUsFn = rxFrameTimeUs;

const serialPortConfig_t *portConfig = findSerialPortConfig(FUNCTION_RX_SERIAL);
if (!portConfig) {
Expand Down
1 change: 0 additions & 1 deletion src/main/rx/ghst.c
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,6 @@ bool ghstRxInit(const rxConfig_t *rxConfig, rxRuntimeState_t *rxRuntimeState)
rxRuntimeState->channelCount = GHST_MAX_NUM_CHANNELS;
rxRuntimeState->rcReadRawFn = ghstReadRawRC;
rxRuntimeState->rcFrameStatusFn = ghstFrameStatus;
rxRuntimeState->rcFrameTimeUsFn = rxFrameTimeUs;
rxRuntimeState->rcProcessFrameFn = ghstProcessFrame;

for (int iChan = 0; iChan < rxRuntimeState->channelCount; ++iChan) {
Expand Down
1 change: 0 additions & 1 deletion src/main/rx/ibus.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ bool ibusInit(const rxConfig_t *rxConfig, rxRuntimeState_t *rxRuntimeState)
rxRuntimeState->channelCount = IBUS_MAX_CHANNEL;
rxRuntimeState->rcReadRawFn = ibusReadRawRC;
rxRuntimeState->rcFrameStatusFn = ibusFrameStatus;
rxRuntimeState->rcFrameTimeUsFn = rxFrameTimeUs;

const serialPortConfig_t *portConfig = findSerialPortConfig(FUNCTION_RX_SERIAL);
if (!portConfig) {
Expand Down
1 change: 0 additions & 1 deletion src/main/rx/jetiexbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,6 @@ bool jetiExBusInit(const rxConfig_t *rxConfig, rxRuntimeState_t *rxRuntimeState)
rxRuntimeState->channelCount = JETIEXBUS_CHANNEL_COUNT;
rxRuntimeState->rcReadRawFn = jetiExBusReadRawRC;
rxRuntimeState->rcFrameStatusFn = jetiExBusFrameStatus;
rxRuntimeState->rcFrameTimeUsFn = rxFrameTimeUs;

jetiExBusFrameReset();

Expand Down
47 changes: 13 additions & 34 deletions src/main/rx/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,9 @@ uint32_t validRxSignalTimeout[MAX_SUPPORTED_RC_CHANNEL_COUNT];
// will not be actioned until the nearest multiple of 100ms
#define PPM_AND_PWM_SAMPLE_COUNT 3

#define DELAY_20_MS (20 * 1000) // 20ms in us
#define DELAY_100_MS (100 * 1000) // 100ms in us
#define RSSI_UPDATE_INTERVAL (20 * 1000) // 20ms in us
#define RX_FRAME_CHECK_INTERVAL (50 * 1000) // 50ms in us
#define RXLOSS_TRIGGER_INTERVAL (150 * 1000) // 150ms in us
#define DELAY_1500_MS (1500 * 1000) // 1.5 seconds in us
#define SKIP_RC_SAMPLES_ON_RESUME 2 // flush 2 samples to drop wrong measurements (timing independent)

Expand Down Expand Up @@ -294,7 +295,7 @@ void rxInit(void)
rxRuntimeState.rcReadRawFn = nullReadRawRC;
rxRuntimeState.rcFrameStatusFn = nullFrameStatus;
rxRuntimeState.rcProcessFrameFn = nullProcessFrame;
rxRuntimeState.lastRcFrameTimeUs = 0;
rxRuntimeState.lastRcFrameTimeUs = 0; // zero when driver does not provide timing info
rcSampleIndex = 0;

for (int i = 0; i < MAX_SUPPORTED_RC_CHANNEL_COUNT; i++) {
Expand Down Expand Up @@ -503,7 +504,8 @@ FAST_CODE_NOINLINE void rxFrameCheck(timeUs_t currentTimeUs, timeDelta_t current
{
bool signalReceived = false;
bool useDataDrivenProcessing = true;
timeDelta_t needRxSignalMaxDelayUs = DELAY_100_MS;
timeDelta_t needRxSignalMaxDelayUs = RXLOSS_TRIGGER_INTERVAL;
timeDelta_t reCheckRxSignalInterval = RX_FRAME_CHECK_INTERVAL;

DEBUG_SET(DEBUG_RX_SIGNAL_LOSS, 2, MIN(2000, currentDeltaTimeUs / 100));

Expand Down Expand Up @@ -558,10 +560,10 @@ FAST_CODE_NOINLINE void rxFrameCheck(timeUs_t currentTimeUs, timeDelta_t current
} else {
// watch for next packet
if (cmpTimeUs(currentTimeUs, needRxSignalBefore) > 0) {
// initial time to signalReceived failure is 100ms, then we check every 100ms
// initial time to signalReceived failure is RXLOSS_TRIGGER_INTERVAL, then we check every RX_FRAME_CHECK_INTERVAL
rxSignalReceived = false;
needRxSignalBefore = currentTimeUs + needRxSignalMaxDelayUs;
// review and process rcData values every 100ms in case failsafe changed them
needRxSignalBefore = currentTimeUs + reCheckRxSignalInterval;
// review and process rcData values every 50ms in case failsafe changed them
rxDataProcessingRequired = true;
}
}
Expand Down Expand Up @@ -685,7 +687,7 @@ void detectAndApplySignalLossBehaviour(void)
const uint32_t currentTimeMs = millis();
const bool boxFailsafeSwitchIsOn = IS_RC_MODE_ACTIVE(BOXFAILSAFE);
rxFlightChannelsValid = rxSignalReceived && !boxFailsafeSwitchIsOn;
// rxFlightChannelsValid is false after 100ms of no packets, or as soon as use the BOXFAILSAFE switch is actioned
// rxFlightChannelsValid is false after RXLOSS_TRIGGER_INTERVAL of no packets, or as soon as use the BOXFAILSAFE switch is actioned
// rxFlightChannelsValid is true the instant we get a good packet or the BOXFAILSAFE switch is reverted
// can also go false with good packets but where one flight channel is bad > 300ms (PPM type receiver error)

Expand Down Expand Up @@ -769,7 +771,8 @@ void detectAndApplySignalLossBehaviour(void)
bool calculateRxChannelsAndUpdateFailsafe(timeUs_t currentTimeUs)
{
if (auxiliaryProcessingRequired) {
auxiliaryProcessingRequired = !rxRuntimeState.rcProcessFrameFn(&rxRuntimeState);
rxRuntimeState.rcProcessFrameFn(&rxRuntimeState);
auxiliaryProcessingRequired = false;
}

if (!rxDataProcessingRequired) {
Expand Down Expand Up @@ -860,7 +863,7 @@ static void updateRSSIADC(timeUs_t currentTimeUs)
if ((int32_t)(currentTimeUs - rssiUpdateAt) < 0) {
return;
}
rssiUpdateAt = currentTimeUs + DELAY_20_MS;
rssiUpdateAt = currentTimeUs + RSSI_UPDATE_INTERVAL;

const uint16_t adcRssiSample = adcGetChannel(ADC_RSSI);
uint16_t rssiValue = adcRssiSample / RSSI_ADC_DIVISOR;
Expand Down Expand Up @@ -1020,27 +1023,3 @@ bool isRssiConfigured(void)
return rssiSource != RSSI_SOURCE_NONE;
}

timeDelta_t rxGetFrameDelta(timeDelta_t *frameAgeUs)
{
static timeUs_t previousFrameTimeUs = 0;
static timeDelta_t frameTimeDeltaUs = 0;

if (rxRuntimeState.rcFrameTimeUsFn) {
const timeUs_t frameTimeUs = rxRuntimeState.rcFrameTimeUsFn();

*frameAgeUs = cmpTimeUs(micros(), frameTimeUs);

const timeDelta_t deltaUs = cmpTimeUs(frameTimeUs, previousFrameTimeUs);
if (deltaUs) {
frameTimeDeltaUs = deltaUs;
previousFrameTimeUs = frameTimeUs;
}
}

return frameTimeDeltaUs;
}

timeUs_t rxFrameTimeUs(void)
{
return rxRuntimeState.lastRcFrameTimeUs;
}
3 changes: 1 addition & 2 deletions src/main/rx/rx.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ typedef struct rxRuntimeState_s {
rcReadRawDataFnPtr rcReadRawFn;
rcFrameStatusFnPtr rcFrameStatusFn;
rcProcessFrameFnPtr rcProcessFrameFn;
rcGetFrameTimeUsFn *rcFrameTimeUsFn;
uint16_t *channelData;
void *frameData;
timeUs_t lastRcFrameTimeUs;
Expand Down Expand Up @@ -228,6 +227,6 @@ void resetAllRxChannelRangeConfigurations(rxChannelRangeConfig_t *rxChannelRange
void suspendRxSignal(void);
void resumeRxSignal(void);

timeDelta_t rxGetFrameDelta(timeDelta_t *frameAgeUs);
timeDelta_t rxGetFrameDelta();

timeUs_t rxFrameTimeUs(void);
13 changes: 4 additions & 9 deletions src/main/rx/rx_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,18 +205,19 @@ STATIC_UNIT_TESTED bool rxSpiSetProtocol(rx_spi_protocol_e protocol)
*/
static uint8_t rxSpiFrameStatus(rxRuntimeState_t *rxRuntimeState)
{
UNUSED(rxRuntimeState);

uint8_t status = RX_FRAME_PENDING;

rx_spi_received_e result = protocolDataReceived(rxSpiPayload);

if (result & RX_SPI_RECEIVED_DATA) {
rxSpiNewPacketAvailable = true;
// use SPI EXTI time as frame time
// note that there is not rx time without EXTI
rxRuntimeState->lastRcFrameTimeUs = rxSpiGetLastExtiTimeUs();
status = RX_FRAME_COMPLETE;
}

if (result & RX_SPI_ROCESSING_REQUIRED) {
if (result & RX_SPI_PROCESSING_REQUIRED) {
status |= RX_FRAME_PROCESSING_REQUIRED;
}

Expand All @@ -236,10 +237,6 @@ static bool rxSpiProcessFrame(const rxRuntimeState_t *rxRuntimeState)
if (result & RX_SPI_RECEIVED_DATA) {
rxSpiNewPacketAvailable = true;
}

if (result & RX_SPI_ROCESSING_REQUIRED) {
return false;
}
}

return true;
Expand All @@ -264,8 +261,6 @@ bool rxSpiInit(const rxSpiConfig_t *rxSpiConfig, rxRuntimeState_t *rxRuntimeStat

if (rxSpiExtiConfigured()) {
rxSpiExtiInit(extiConfig.ioConfig, extiConfig.trigger);

rxRuntimeState->rcFrameTimeUsFn = rxSpiGetLastExtiTimeUs;
}

rxSpiNewPacketAvailable = false;
Expand Down
2 changes: 1 addition & 1 deletion src/main/rx/rx_spi.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ typedef enum {
RX_SPI_RECEIVED_NONE = 0,
RX_SPI_RECEIVED_BIND = (1 << 0),
RX_SPI_RECEIVED_DATA = (1 << 1),
RX_SPI_ROCESSING_REQUIRED = (1 << 2),
RX_SPI_PROCESSING_REQUIRED = (1 << 2),
} rx_spi_received_e;

// RC channels in AETR order
Expand Down
1 change: 0 additions & 1 deletion src/main/rx/sbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ bool sbusInit(const rxConfig_t *rxConfig, rxRuntimeState_t *rxRuntimeState)
}

rxRuntimeState->rcFrameStatusFn = sbusFrameStatus;
rxRuntimeState->rcFrameTimeUsFn = rxFrameTimeUs;

const serialPortConfig_t *portConfig = findSerialPortConfig(FUNCTION_RX_SERIAL);
if (!portConfig) {
Expand Down
1 change: 0 additions & 1 deletion src/main/rx/spektrum.c
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,6 @@ bool spektrumInit(const rxConfig_t *rxConfig, rxRuntimeState_t *rxRuntimeState)

rxRuntimeState->rcReadRawFn = spektrumReadRawRC;
rxRuntimeState->rcFrameStatusFn = spektrumFrameStatus;
rxRuntimeState->rcFrameTimeUsFn = rxFrameTimeUs;
#if defined(USE_TELEMETRY_SRXL)
rxRuntimeState->rcProcessFrameFn = spektrumProcessFrame;
#endif
Expand Down
1 change: 0 additions & 1 deletion src/main/rx/srxl2.c
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,6 @@ bool srxl2RxInit(const rxConfig_t *rxConfig, rxRuntimeState_t *rxRuntimeState)
rxRuntimeState->channelCount = SRXL2_MAX_CHANNELS;
rxRuntimeState->rcReadRawFn = srxl2ReadRawRC;
rxRuntimeState->rcFrameStatusFn = srxl2FrameStatus;
rxRuntimeState->rcFrameTimeUsFn = rxFrameTimeUs;
rxRuntimeState->rcProcessFrameFn = srxl2ProcessFrame;

const serialPortConfig_t *portConfig = findSerialPortConfig(FUNCTION_RX_SERIAL);
Expand Down
1 change: 0 additions & 1 deletion src/main/rx/sumd.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ bool sumdInit(const rxConfig_t *rxConfig, rxRuntimeState_t *rxRuntimeState)
rxRuntimeState->channelCount = MIN(SUMD_MAX_CHANNEL, MAX_SUPPORTED_RC_CHANNEL_COUNT);
rxRuntimeState->rcReadRawFn = sumdReadRawRC;
rxRuntimeState->rcFrameStatusFn = sumdFrameStatus;
rxRuntimeState->rcFrameTimeUsFn = rxFrameTimeUs;

const serialPortConfig_t *portConfig = findSerialPortConfig(FUNCTION_RX_SERIAL);
if (!portConfig) {
Expand Down
Loading