From b57fd7b53dfbc4707875d45f1ebbb8bfd426ddd1 Mon Sep 17 00:00:00 2001 From: Michael Keller Date: Sun, 28 Apr 2019 12:22:31 +1200 Subject: [PATCH] For Discussion: modify filter defaults to reduce risk of flyaways (#8043) For Discussion: modify filter defaults to reduce risk of flyaways --- src/main/flight/pid.c | 4 ++-- src/main/sensors/gyro.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/flight/pid.c b/src/main/flight/pid.c index 8542730429..8be11b34dd 100644 --- a/src/main/flight/pid.c +++ b/src/main/flight/pid.c @@ -185,9 +185,9 @@ void resetPidProfile(pidProfile_t *pidProfile) // overridden and the static lowpass 1 is disabled. We can't set this // value to 0 otherwise Configurator versions 10.4 and earlier will also // reset the lowpass filter type to PT1 overriding the desired BIQUAD setting. - .dterm_lowpass2_hz = 150, // second Dterm LPF ON by default + .dterm_lowpass2_hz = 100, // second Dterm LPF ON by default .dterm_filter_type = FILTER_BIQUAD, - .dterm_filter2_type = FILTER_BIQUAD, + .dterm_filter2_type = FILTER_PT1, .dyn_lpf_dterm_min_hz = 150, .dyn_lpf_dterm_max_hz = 250, .launchControlMode = LAUNCH_CONTROL_MODE_NORMAL, diff --git a/src/main/sensors/gyro.c b/src/main/sensors/gyro.c index 3cbec23e96..f4ecdd4d91 100644 --- a/src/main/sensors/gyro.c +++ b/src/main/sensors/gyro.c @@ -208,8 +208,8 @@ void pgResetFn_gyroConfig(gyroConfig_t *gyroConfig) // overridden and the static lowpass 1 is disabled. We can't set this // value to 0 otherwise Configurator versions 10.4 and earlier will also // reset the lowpass filter type to PT1 overriding the desired BIQUAD setting. - gyroConfig->gyro_lowpass2_type = FILTER_BIQUAD; - gyroConfig->gyro_lowpass2_hz = 0; + gyroConfig->gyro_lowpass2_type = FILTER_PT1; + gyroConfig->gyro_lowpass2_hz = 150; gyroConfig->gyro_high_fsr = false; gyroConfig->gyro_to_use = GYRO_CONFIG_USE_GYRO_DEFAULT; gyroConfig->gyro_soft_notch_hz_1 = 0;