mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 14:25:20 +03:00
Fixed setting of notch filter cutoffs to 0 in CLI.
This commit is contained in:
parent
13308883b2
commit
f5d2f534b4
2 changed files with 6 additions and 6 deletions
|
@ -172,7 +172,7 @@ void pidInitFilters(const pidProfile_t *pidProfile)
|
|||
|
||||
const uint32_t pidFrequencyNyquist = (1.0f / dT) / 2; // No rounding needed
|
||||
|
||||
float dTermNotchHz;
|
||||
uint16_t dTermNotchHz;
|
||||
if (pidProfile->dterm_notch_hz <= pidFrequencyNyquist) {
|
||||
dTermNotchHz = pidProfile->dterm_notch_hz;
|
||||
} else {
|
||||
|
@ -183,8 +183,8 @@ void pidInitFilters(const pidProfile_t *pidProfile)
|
|||
}
|
||||
}
|
||||
|
||||
static biquadFilter_t biquadFilterNotch[2];
|
||||
if (dTermNotchHz) {
|
||||
if (dTermNotchHz != 0 && pidProfile->dterm_notch_cutoff != 0) {
|
||||
static biquadFilter_t biquadFilterNotch[2];
|
||||
dtermNotchFilterApplyFn = (filterApplyFnPtr)biquadFilterApply;
|
||||
const float notchQ = filterGetNotchQ(dTermNotchHz, pidProfile->dterm_notch_cutoff);
|
||||
for (int axis = FD_ROLL; axis <= FD_PITCH; axis++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue