mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 00:35:39 +03:00
Configurable Soft LPF values (gyro_lpf_hz and dterm_lpf_hz)
This commit is contained in:
parent
a8916a3ddd
commit
93d917af3b
8 changed files with 88 additions and 98 deletions
|
@ -134,7 +134,7 @@ static uint32_t activeFeaturesLatch = 0;
|
|||
static uint8_t currentControlRateProfileIndex = 0;
|
||||
controlRateConfig_t *currentControlRateProfile;
|
||||
|
||||
static const uint8_t EEPROM_CONF_VERSION = 117;
|
||||
static const uint8_t EEPROM_CONF_VERSION = 118;
|
||||
|
||||
static void resetAccelerometerTrims(flightDynamicsTrims_t *accelerometerTrims)
|
||||
{
|
||||
|
@ -176,7 +176,8 @@ static void resetPidProfile(pidProfile_t *pidProfile)
|
|||
pidProfile->I8[PIDVEL] = 45;
|
||||
pidProfile->D8[PIDVEL] = 1;
|
||||
|
||||
pidProfile->gyro_soft_lpf = 1; // filtering ON by default
|
||||
pidProfile->gyro_lpf_hz = 60; // filtering ON by default
|
||||
pidProfile->dterm_lpf_hz = 50; // filtering ON by default
|
||||
pidProfile->airModeInsaneAcrobilityFactor = 0;
|
||||
|
||||
pidProfile->P_f[ROLL] = 1.5f; // new PID with preliminary defaults test carefully
|
||||
|
@ -747,7 +748,7 @@ void activateConfig(void)
|
|||
¤tProfile->pidProfile
|
||||
);
|
||||
|
||||
useGyroConfig(&masterConfig.gyroConfig, currentProfile->pidProfile.gyro_soft_lpf);
|
||||
useGyroConfig(&masterConfig.gyroConfig, ¤tProfile->pidProfile.gyro_lpf_hz);
|
||||
|
||||
#ifdef TELEMETRY
|
||||
telemetryUseConfig(&masterConfig.telemetryConfig);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue