mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 04:45:24 +03:00
Merge pull request #7888 from mikeller/fix_lowpass_defaults
Fixed defaults for lowpass filters.
This commit is contained in:
commit
ef831e64b1
3 changed files with 41 additions and 27 deletions
|
@ -203,7 +203,7 @@ void resetPidProfile(pidProfile_t *pidProfile)
|
|||
.transient_throttle_limit = 15,
|
||||
);
|
||||
#ifdef USE_DYN_LPF
|
||||
pidProfile->dterm_lowpass_hz = 150;
|
||||
pidProfile->dterm_lowpass_hz = 0;
|
||||
pidProfile->dterm_lowpass2_hz = 150;
|
||||
pidProfile->dterm_filter_type = FILTER_BIQUAD;
|
||||
pidProfile->dterm_filter2_type = FILTER_BIQUAD;
|
||||
|
@ -339,7 +339,9 @@ void pidInitFilters(const pidProfile_t *pidProfile)
|
|||
uint16_t dterm_lowpass_hz = pidProfile->dterm_lowpass_hz;
|
||||
|
||||
#ifdef USE_DYN_LPF
|
||||
dterm_lowpass_hz = MAX(pidProfile->dterm_lowpass_hz, pidProfile->dyn_lpf_dterm_min_hz);
|
||||
if (pidProfile->dyn_lpf_dterm_min_hz) {
|
||||
dterm_lowpass_hz = pidProfile->dyn_lpf_dterm_min_hz;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (dterm_lowpass_hz > 0 && dterm_lowpass_hz < pidFrequencyNyquist) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue