1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-21 23:35:34 +03:00

Add biquad crossfading

+ RPM filter fix (oscillations on throttle chops)
This commit is contained in:
KarateBrot 2021-06-27 23:46:45 +02:00
parent 74739ab82f
commit 48f14686d5
8 changed files with 76 additions and 47 deletions

View file

@ -95,7 +95,7 @@ void pidInitFilters(const pidProfile_t *pidProfile)
pidRuntime.dtermNotchApplyFn = (filterApplyFnPtr)biquadFilterApply;
const float notchQ = filterGetNotchQ(dTermNotchHz, pidProfile->dterm_notch_cutoff);
for (int axis = FD_ROLL; axis <= FD_YAW; axis++) {
biquadFilterInit(&pidRuntime.dtermNotch[axis], dTermNotchHz, targetPidLooptime, notchQ, FILTER_NOTCH);
biquadFilterInit(&pidRuntime.dtermNotch[axis], dTermNotchHz, targetPidLooptime, notchQ, FILTER_NOTCH, 1.0f);
}
} else {
pidRuntime.dtermNotchApplyFn = nullFilterApply;