mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 16:25:31 +03:00
Merge pull request #11668 from daleckystepan/rx_refresh_rate_cleanup
This commit is contained in:
commit
0d9c516159
18 changed files with 0 additions and 39 deletions
|
@ -626,8 +626,6 @@ bool crsfRxInit(const rxConfig_t *rxConfig, rxRuntimeState_t *rxRuntimeState)
|
|||
}
|
||||
|
||||
rxRuntimeState->channelCount = CRSF_MAX_CHANNEL;
|
||||
rxRuntimeState->rxRefreshRate = CRSF_TIME_BETWEEN_FRAMES_US; //!!TODO this needs checking
|
||||
|
||||
rxRuntimeState->rcReadRawFn = crsfReadRawRC;
|
||||
rxRuntimeState->rcFrameStatusFn = crsfFrameStatus;
|
||||
rxRuntimeState->rcFrameTimeUsFn = rxFrameTimeUs;
|
||||
|
|
|
@ -391,8 +391,6 @@ bool fportRxInit(const rxConfig_t *rxConfig, rxRuntimeState_t *rxRuntimeState)
|
|||
sbusChannelsInit(rxConfig, rxRuntimeState);
|
||||
|
||||
rxRuntimeState->channelCount = SBUS_MAX_CHANNEL;
|
||||
rxRuntimeState->rxRefreshRate = 11000;
|
||||
|
||||
rxRuntimeState->rcFrameStatusFn = fportFrameStatus;
|
||||
rxRuntimeState->rcProcessFrameFn = fportProcessFrame;
|
||||
rxRuntimeState->rcFrameTimeUsFn = rxFrameTimeUs;
|
||||
|
|
|
@ -318,8 +318,6 @@ bool ghstRxInit(const rxConfig_t *rxConfig, rxRuntimeState_t *rxRuntimeState)
|
|||
}
|
||||
|
||||
rxRuntimeState->channelCount = GHST_MAX_NUM_CHANNELS;
|
||||
rxRuntimeState->rxRefreshRate = GHST_TIME_BETWEEN_FRAMES_US;
|
||||
|
||||
rxRuntimeState->rcReadRawFn = ghstReadRawRC;
|
||||
rxRuntimeState->rcFrameStatusFn = ghstFrameStatus;
|
||||
rxRuntimeState->rcFrameTimeUsFn = rxFrameTimeUs;
|
||||
|
|
|
@ -207,8 +207,6 @@ bool ibusInit(const rxConfig_t *rxConfig, rxRuntimeState_t *rxRuntimeState)
|
|||
ibusSyncByte = 0;
|
||||
|
||||
rxRuntimeState->channelCount = IBUS_MAX_CHANNEL;
|
||||
rxRuntimeState->rxRefreshRate = 20000; // TODO - Verify speed
|
||||
|
||||
rxRuntimeState->rcReadRawFn = ibusReadRawRC;
|
||||
rxRuntimeState->rcFrameStatusFn = ibusFrameStatus;
|
||||
rxRuntimeState->rcFrameTimeUsFn = rxFrameTimeUs;
|
||||
|
|
|
@ -249,8 +249,6 @@ bool jetiExBusInit(const rxConfig_t *rxConfig, rxRuntimeState_t *rxRuntimeState)
|
|||
UNUSED(rxConfig);
|
||||
|
||||
rxRuntimeState->channelCount = JETIEXBUS_CHANNEL_COUNT;
|
||||
rxRuntimeState->rxRefreshRate = 5500;
|
||||
|
||||
rxRuntimeState->rcReadRawFn = jetiExBusReadRawRC;
|
||||
rxRuntimeState->rcFrameStatusFn = jetiExBusFrameStatus;
|
||||
rxRuntimeState->rcFrameTimeUsFn = rxFrameTimeUs;
|
||||
|
|
|
@ -76,8 +76,6 @@ void rxMspInit(const rxConfig_t *rxConfig, rxRuntimeState_t *rxRuntimeState)
|
|||
UNUSED(rxConfig);
|
||||
|
||||
rxRuntimeState->channelCount = MAX_SUPPORTED_RC_CHANNEL_COUNT;
|
||||
rxRuntimeState->rxRefreshRate = 20000;
|
||||
|
||||
rxRuntimeState->rcReadRawFn = rxMspReadRawRC;
|
||||
rxRuntimeState->rcFrameStatusFn = rxMspFrameStatus;
|
||||
}
|
||||
|
|
|
@ -57,8 +57,6 @@ void rxPwmInit(const rxConfig_t *rxConfig, rxRuntimeState_t *rxRuntimeState)
|
|||
{
|
||||
UNUSED(rxConfig);
|
||||
|
||||
rxRuntimeState->rxRefreshRate = 20000;
|
||||
|
||||
// configure PWM/CPPM read function and max number of channels. serial rx below will override both of these, if enabled
|
||||
switch (rxRuntimeState->rxProvider) {
|
||||
default:
|
||||
|
|
|
@ -930,11 +930,6 @@ uint16_t rxGetUplinkTxPwrMw(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
uint16_t rxGetRefreshRate(void)
|
||||
{
|
||||
return rxRuntimeState.rxRefreshRate;
|
||||
}
|
||||
|
||||
bool isRssiConfigured(void)
|
||||
{
|
||||
return rssiSource != RSSI_SOURCE_NONE;
|
||||
|
|
|
@ -142,7 +142,6 @@ typedef struct rxRuntimeState_s {
|
|||
rxProvider_t rxProvider;
|
||||
SerialRXType serialrxProvider;
|
||||
uint8_t channelCount; // number of RC channels as reported by current input driver
|
||||
uint16_t rxRefreshRate;
|
||||
rcReadRawDataFnPtr rcReadRawFn;
|
||||
rcFrameStatusFnPtr rcFrameStatusFn;
|
||||
rcProcessFrameFnPtr rcProcessFrameFn;
|
||||
|
@ -217,8 +216,6 @@ void resetAllRxChannelRangeConfigurations(rxChannelRangeConfig_t *rxChannelRange
|
|||
void suspendRxSignal(void);
|
||||
void resumeRxSignal(void);
|
||||
|
||||
uint16_t rxGetRefreshRate(void);
|
||||
|
||||
timeDelta_t rxGetFrameDelta(timeDelta_t *frameAgeUs);
|
||||
|
||||
timeUs_t rxFrameTimeUs(void);
|
||||
|
|
|
@ -269,7 +269,6 @@ bool rxSpiInit(const rxSpiConfig_t *rxSpiConfig, rxRuntimeState_t *rxRuntimeStat
|
|||
}
|
||||
|
||||
rxSpiNewPacketAvailable = false;
|
||||
rxRuntimeState->rxRefreshRate = 20000;
|
||||
|
||||
rxRuntimeState->rcReadRawFn = rxSpiReadRawRC;
|
||||
rxRuntimeState->rcFrameStatusFn = rxSpiFrameStatus;
|
||||
|
|
|
@ -171,10 +171,8 @@ bool sbusInit(const rxConfig_t *rxConfig, rxRuntimeState_t *rxRuntimeState)
|
|||
rxRuntimeState->channelCount = SBUS_MAX_CHANNEL;
|
||||
|
||||
if (rxConfig->sbus_baud_fast) {
|
||||
rxRuntimeState->rxRefreshRate = SBUS_FAST_RX_REFRESH_RATE;
|
||||
sbusBaudRate = SBUS_FAST_BAUDRATE;
|
||||
} else {
|
||||
rxRuntimeState->rxRefreshRate = SBUS_RX_REFRESH_RATE;
|
||||
sbusBaudRate = SBUS_BAUDRATE;
|
||||
}
|
||||
|
||||
|
|
|
@ -374,7 +374,6 @@ bool spektrumInit(const rxConfig_t *rxConfig, rxRuntimeState_t *rxRuntimeState)
|
|||
spekHiRes = true;
|
||||
resolution = 2048;
|
||||
rxRuntimeState->channelCount = SPEKTRUM_2048_CHANNEL_COUNT;
|
||||
rxRuntimeState->rxRefreshRate = 11000;
|
||||
break;
|
||||
case SERIALRX_SPEKTRUM1024:
|
||||
// 10 bit frames
|
||||
|
@ -383,7 +382,6 @@ bool spektrumInit(const rxConfig_t *rxConfig, rxRuntimeState_t *rxRuntimeState)
|
|||
spekHiRes = false;
|
||||
resolution = 1024;
|
||||
rxRuntimeState->channelCount = SPEKTRUM_1024_CHANNEL_COUNT;
|
||||
rxRuntimeState->rxRefreshRate = 22000;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -488,8 +488,6 @@ bool srxl2RxInit(const rxConfig_t *rxConfig, rxRuntimeState_t *rxRuntimeState)
|
|||
|
||||
rxRuntimeState->channelData = channelData;
|
||||
rxRuntimeState->channelCount = SRXL2_MAX_CHANNELS;
|
||||
rxRuntimeState->rxRefreshRate = SRXL2_FRAME_PERIOD_US;
|
||||
|
||||
rxRuntimeState->rcReadRawFn = srxl2ReadRawRC;
|
||||
rxRuntimeState->rcFrameStatusFn = srxl2FrameStatus;
|
||||
rxRuntimeState->rcFrameTimeUsFn = rxFrameTimeUs;
|
||||
|
|
|
@ -172,8 +172,6 @@ bool sumdInit(const rxConfig_t *rxConfig, rxRuntimeState_t *rxRuntimeState)
|
|||
UNUSED(rxConfig);
|
||||
|
||||
rxRuntimeState->channelCount = MIN(SUMD_MAX_CHANNEL, MAX_SUPPORTED_RC_CHANNEL_COUNT);
|
||||
rxRuntimeState->rxRefreshRate = 11000;
|
||||
|
||||
rxRuntimeState->rcReadRawFn = sumdReadRawRC;
|
||||
rxRuntimeState->rcFrameStatusFn = sumdFrameStatus;
|
||||
rxRuntimeState->rcFrameTimeUsFn = rxFrameTimeUs;
|
||||
|
|
|
@ -124,8 +124,6 @@ bool sumhInit(const rxConfig_t *rxConfig, rxRuntimeState_t *rxRuntimeState)
|
|||
UNUSED(rxConfig);
|
||||
|
||||
rxRuntimeState->channelCount = SUMH_MAX_CHANNEL_COUNT;
|
||||
rxRuntimeState->rxRefreshRate = 11000;
|
||||
|
||||
rxRuntimeState->rcReadRawFn = sumhReadRawRC;
|
||||
rxRuntimeState->rcFrameStatusFn = sumhFrameStatus;
|
||||
|
||||
|
|
|
@ -292,8 +292,6 @@ bool xBusInit(const rxConfig_t *rxConfig, rxRuntimeState_t *rxRuntimeState)
|
|||
break;
|
||||
}
|
||||
|
||||
rxRuntimeState->rxRefreshRate = 11000;
|
||||
|
||||
rxRuntimeState->rcReadRawFn = xBusReadRawRC;
|
||||
rxRuntimeState->rcFrameStatusFn = xBusFrameStatus;
|
||||
|
||||
|
|
|
@ -218,7 +218,6 @@ TEST_F(IbusRxInitUnitTest, Test_IbusRxNotEnabled)
|
|||
// EXPECT_EQ(NULL, rxRuntimeState.rcFrameStatusFn);
|
||||
|
||||
EXPECT_EQ(18, rxRuntimeState.channelCount);
|
||||
EXPECT_EQ(20000, rxRuntimeState.rxRefreshRate);
|
||||
EXPECT_FALSE(NULL == rxRuntimeState.rcReadRawFn);
|
||||
EXPECT_FALSE(NULL == rxRuntimeState.rcFrameStatusFn);
|
||||
}
|
||||
|
@ -233,7 +232,6 @@ TEST_F(IbusRxInitUnitTest, Test_IbusRxEnabled)
|
|||
EXPECT_TRUE(ibusInit(&initialRxConfig, &rxRuntimeState));
|
||||
|
||||
EXPECT_EQ(18, rxRuntimeState.channelCount);
|
||||
EXPECT_EQ(20000, rxRuntimeState.rxRefreshRate);
|
||||
EXPECT_FALSE(NULL == rxRuntimeState.rcReadRawFn);
|
||||
EXPECT_FALSE(NULL == rxRuntimeState.rcFrameStatusFn);
|
||||
|
||||
|
|
|
@ -163,7 +163,6 @@ TEST_F(SumdRxInitUnitTest, Test_SumdRxNotEnabled)
|
|||
EXPECT_FALSE(sumdInit(&initialRxConfig, &rxRuntimeState));
|
||||
|
||||
EXPECT_EQ(18, rxRuntimeState.channelCount);
|
||||
EXPECT_EQ(11000, rxRuntimeState.rxRefreshRate);
|
||||
EXPECT_FALSE(NULL == rxRuntimeState.rcReadRawFn);
|
||||
EXPECT_FALSE(NULL == rxRuntimeState.rcFrameStatusFn);
|
||||
}
|
||||
|
@ -178,7 +177,6 @@ TEST_F(SumdRxInitUnitTest, Test_SumdRxEnabled)
|
|||
EXPECT_TRUE(sumdInit(&initialRxConfig, &rxRuntimeState));
|
||||
|
||||
EXPECT_EQ(18, rxRuntimeState.channelCount);
|
||||
EXPECT_EQ(11000, rxRuntimeState.rxRefreshRate);
|
||||
EXPECT_FALSE(NULL == rxRuntimeState.rcReadRawFn);
|
||||
EXPECT_FALSE(NULL == rxRuntimeState.rcFrameStatusFn);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue