7 #define UNUSED(x) (void)(x)
121 #define MAX_INVALID_PULS_TIME 300
126 #define DELAY_10_HZ (1000000 / 10)
347 #if defined(USE_PWM) || defined(USE_PPM)
709 #define RSSI_SAMPLE_COUNT 16
714 static uint8_t sampleIndex = 0;
715 static unsigned sum = 0;
717 sum += value - samples[sampleIndex];
718 samples[sampleIndex] = value;
void pt1FilterInit(pt1Filter_t *filter, float k)
float pt1FilterGain(float f_cut, float dT)
float pt1FilterApply(pt1Filter_t *filter, float input)
#define featureIsEnabled(mask)
@ FEATURE_RX_PARALLEL_PWM
void setRssi(uint16_t rssiValue, rssiSource_e source)
void rxInit(void)
!TODO remove this extern, only needed once for channelCount
#define RSSI_SAMPLE_COUNT
static uint8_t rxChannelCount
static uint32_t needRxSignalMaxDelayUs
uint32_t rcInvalidPulsPeriod[MAX_SUPPORTED_RC_CHANNEL_COUNT]
static uint16_t updateRssiSamples(uint16_t value)
static pt1Filter_t frameErrFilter
static bool nullProcessFrame(const rxRuntimeConfig_t *rxRuntimeConfig)
static uint8_t rcSampleIndex
static uint8_t nullFrameStatus(rxRuntimeConfig_t *rxRuntimeConfig)
void setRssiDirect(uint16_t newRssi, rssiSource_e source)
#define MAX_INVALID_PULS_TIME
int16_t rcData[MAX_SUPPORTED_RC_CHANNEL_COUNT]
static uint16_t nullReadRawRC(const rxRuntimeConfig_t *rxRuntimeConfig, uint8_t channel)
rxRuntimeConfig_t rxRuntimeConfig
#define MAX_SUPPORTED_RC_CHANNEL_COUNT
@ RSSI_SOURCE_FRAME_ERRORS
rcFrameStatusFnPtr rcFrameStatusFn
@ RX_PROVIDER_PARALLEL_PWM
SerialRXType serialrxProvider
rcProcessFrameFnPtr rcProcessFrameFn
rcReadRawDataFnPtr rcReadRawFn
#define NON_AUX_CHANNEL_COUNT
bool rxSpiInit(const rxSpiConfig_t *rxSpiConfig, rxRuntimeConfig_t *rxRuntimeConfig)
const rxSpiConfig_t * rxSpiConfig(void)
const rxConfig_t * rxConfig(void)
uint8_t serialrx_provider
#define FRAME_ERR_RESAMPLE_US
#define GET_FRAME_ERR_LPF_FREQUENCY(period)
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
short int16_t
Typedef defining 16 bit short type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.