1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-16 12:55:19 +03:00

Fix SPI FrskyD rx frame rate detection

Decrease the minimum on the valid rx frame time window. SPI FrskyD seems to have frames with quite variable timing and if a frame was outside the valid window training would get reset and never complete.  The valid frame timings have no impact on the calculations or operation - they are just sanity checks.
This commit is contained in:
Bruce Luckcuck 2018-07-03 17:03:37 -04:00
parent b44784d962
commit 359a014a98

View file

@ -75,7 +75,7 @@ enum {
#define RC_SMOOTHING_FILTER_TRAINING_DELAY_MS 1000 // Additional time to wait after receiving first valid rx frame before initial training starts
#define RC_SMOOTHING_FILTER_RETRAINING_DELAY_MS 2000 // Guard time to wait after retraining to prevent retraining again too quickly
#define RC_SMOOTHING_RX_RATE_CHANGE_PERCENT 20 // Look for samples varying this much from the current detected frame rate to initiate retraining
#define RC_SMOOTHING_RX_RATE_MIN_US 5000 // 5ms or 200hz
#define RC_SMOOTHING_RX_RATE_MIN_US 1000 // 1ms
#define RC_SMOOTHING_RX_RATE_MAX_US 50000 // 50ms or 20hz
static FAST_RAM_ZERO_INIT rcSmoothingFilter_t rcSmoothingData;