Fix dynamic filter for gyro loop < 4K
commitf252b09fdb4f5e2e14a66ed88b09bad73f3f0d83
authorBruce Luckcuck <github@etracer.net>
Sun, 29 Jul 2018 13:48:32 +0000 (29 09:48 -0400)
committerBruce Luckcuck <github@etracer.net>
Tue, 31 Jul 2018 12:59:27 +0000 (31 08:59 -0400)
tree3c3f2131b49dfb7a836d6365b0fab8b1b7c7cd75
parent45002a803ee9a74ac2ea1b7f6a29995561229547
Fix dynamic filter for gyro loop < 4K
For gyro loops from 2K to < 4K scale the FFT_SAMPLING_RATE_HZ to ensure we get 3 samples.

Also constrain the `centerFreq` result from the lowpass to ensure it doesn't overshoot beyond the min/max notch center cutoff.
src/main/sensors/gyro.c
src/main/sensors/gyroanalyse.c
src/main/sensors/gyroanalyse.h