1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-13 11:29:58 +03:00

Make the imuGyroFilter actually filter (#13961)

This commit is contained in:
Kevin Plaizier 2024-10-08 13:44:39 -06:00 committed by GitHub
parent 07bf547d42
commit ea30a11d1a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -278,7 +278,7 @@ void gyroInitFilters(void)
dynNotchInit(dynNotchConfig(), gyro.targetLooptime);
#endif
const float k = pt1FilterGain(GYRO_IMU_DOWNSAMPLE_CUTOFF_HZ, gyro.targetLooptime);
const float k = pt1FilterGain(GYRO_IMU_DOWNSAMPLE_CUTOFF_HZ, gyro.targetLooptime * 1e-6f);
for (int axis = 0; axis < XYZ_AXIS_COUNT; axis++) {
pt1FilterInit(&gyro.imuGyroFilter[axis], k);
}