Merge pull request #11038 from ctzsnooze/include-lpf1_static-in-simplified-tuning
This commit is contained in:
commit
c49f42939c
|
@ -67,6 +67,7 @@ static void calculateNewDTermFilterValues(pidProfile_t *pidProfile)
|
|||
{
|
||||
pidProfile->dterm_lpf1_dyn_min_hz = constrain(DTERM_LPF1_DYN_MIN_HZ_DEFAULT * pidProfile->simplified_dterm_filter_multiplier / 100, 0, DYN_LPF_MAX_HZ);
|
||||
pidProfile->dterm_lpf1_dyn_max_hz = constrain(DTERM_LPF1_DYN_MAX_HZ_DEFAULT * pidProfile->simplified_dterm_filter_multiplier / 100, 0, DYN_LPF_MAX_HZ);
|
||||
pidProfile->dterm_lpf1_static_hz = constrain(DTERM_LPF1_DYN_MIN_HZ_DEFAULT * pidProfile->simplified_dterm_filter_multiplier / 100, 0, DYN_LPF_MAX_HZ);
|
||||
pidProfile->dterm_lpf2_static_hz = constrain(DTERM_LPF2_HZ_DEFAULT * pidProfile->simplified_dterm_filter_multiplier / 100, 0, LPF_MAX_HZ);
|
||||
pidProfile->dterm_lpf1_type = FILTER_PT1;
|
||||
pidProfile->dterm_lpf2_type = FILTER_PT1;
|
||||
|
@ -76,6 +77,7 @@ static void calculateNewGyroFilterValues()
|
|||
{
|
||||
gyroConfigMutable()->gyro_lpf1_dyn_min_hz = constrain(GYRO_LPF1_DYN_MIN_HZ_DEFAULT * gyroConfig()->simplified_gyro_filter_multiplier / 100, 0, DYN_LPF_MAX_HZ);
|
||||
gyroConfigMutable()->gyro_lpf1_dyn_max_hz = constrain(GYRO_LPF1_DYN_MAX_HZ_DEFAULT * gyroConfig()->simplified_gyro_filter_multiplier / 100, 0, DYN_LPF_MAX_HZ);
|
||||
gyroConfigMutable()->gyro_lpf1_static_hz = constrain(GYRO_LPF1_DYN_MIN_HZ_DEFAULT * gyroConfig()->simplified_gyro_filter_multiplier / 100, 0, DYN_LPF_MAX_HZ);
|
||||
gyroConfigMutable()->gyro_lpf2_static_hz = constrain(GYRO_LPF2_HZ_DEFAULT * gyroConfig()->simplified_gyro_filter_multiplier / 100, 0, LPF_MAX_HZ);
|
||||
gyroConfigMutable()->gyro_lpf1_type = FILTER_PT1;
|
||||
gyroConfigMutable()->gyro_lpf2_type = FILTER_PT1;
|
||||
|
|
|
@ -173,7 +173,8 @@ void resetPidProfile(pidProfile_t *pidProfile)
|
|||
.abs_control_error_limit = 20,
|
||||
.abs_control_cutoff = 11,
|
||||
.antiGravityMode = ANTI_GRAVITY_SMOOTH,
|
||||
.dterm_lpf1_static_hz = 150, // NOTE: dynamic lpf is enabled by default so this setting is actually
|
||||
.dterm_lpf1_static_hz = DTERM_LPF1_DYN_MIN_HZ_DEFAULT,
|
||||
// NOTE: dynamic lpf is enabled by default so this setting is actually
|
||||
// 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.
|
||||
|
@ -222,10 +223,12 @@ void resetPidProfile(pidProfile_t *pidProfile)
|
|||
.simplified_dterm_filter = true,
|
||||
.simplified_dterm_filter_multiplier = SIMPLIFIED_TUNING_DEFAULT,
|
||||
);
|
||||
|
||||
#ifndef USE_D_MIN
|
||||
pidProfile->pid[PID_ROLL].D = 30;
|
||||
pidProfile->pid[PID_PITCH].D = 32;
|
||||
#endif
|
||||
|
||||
#ifdef USE_SIMPLIFIED_TUNING
|
||||
applySimplifiedTuning(pidProfile);
|
||||
#endif
|
||||
|
|
|
@ -110,7 +110,8 @@ void pgResetFn_gyroConfig(gyroConfig_t *gyroConfig)
|
|||
gyroConfig->gyroMovementCalibrationThreshold = 48;
|
||||
gyroConfig->gyro_hardware_lpf = GYRO_HARDWARE_LPF_NORMAL;
|
||||
gyroConfig->gyro_lpf1_type = FILTER_PT1;
|
||||
gyroConfig->gyro_lpf1_static_hz = 250; // NOTE: dynamic lpf is enabled by default so this setting is actually
|
||||
gyroConfig->gyro_lpf1_static_hz = GYRO_LPF1_DYN_MIN_HZ_DEFAULT;
|
||||
// NOTE: dynamic lpf is enabled by default so this setting is actually
|
||||
// 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.
|
||||
|
|
Loading…
Reference in New Issue