Scale down dtermSetpointWeight
This commit is contained in:
parent
f2bb5374e7
commit
ff1f9ce770
|
@ -707,7 +707,7 @@ const clivalue_t valueTable[] = {
|
|||
{ "anti_gravity_thresh", VAR_UINT16 | PROFILE_VALUE, &masterConfig.profile[0].pidProfile.itermThrottleThreshold, .config.minmax = {20, 1000 } },
|
||||
{ "anti_gravity_gain", VAR_FLOAT | PROFILE_VALUE, &masterConfig.profile[0].pidProfile.itermAcceleratorGain, .config.minmax = {1, 30 } },
|
||||
{ "setpoint_relax_ratio", VAR_UINT8 | PROFILE_VALUE, &masterConfig.profile[0].pidProfile.setpointRelaxRatio, .config.minmax = {0, 100 } },
|
||||
{ "d_setpoint_weight", VAR_UINT8 | PROFILE_VALUE, &masterConfig.profile[0].pidProfile.dtermSetpointWeight, .config.minmax = {0, 255 } },
|
||||
{ "d_setpoint_weight", VAR_UINT8 | PROFILE_VALUE, &masterConfig.profile[0].pidProfile.dtermSetpointWeight, .config.minmax = {0, 254 } },
|
||||
{ "yaw_accel_limit", VAR_FLOAT | PROFILE_VALUE, &masterConfig.profile[0].pidProfile.yawRateAccelLimit, .config.minmax = {0.1f, 50.0f } },
|
||||
{ "accel_limit", VAR_FLOAT | PROFILE_VALUE, &masterConfig.profile[0].pidProfile.rateAccelLimit, .config.minmax = {0.1f, 50.0f } },
|
||||
|
||||
|
|
|
@ -174,8 +174,8 @@ static void resetPidProfile(pidProfile_t *pidProfile)
|
|||
pidProfile->pidAtMinThrottle = PID_STABILISATION_ON;
|
||||
pidProfile->levelAngleLimit = 55;
|
||||
pidProfile->levelSensitivity = 55;
|
||||
pidProfile->setpointRelaxRatio = 20;
|
||||
pidProfile->dtermSetpointWeight = 190;
|
||||
pidProfile->setpointRelaxRatio = 25;
|
||||
pidProfile->dtermSetpointWeight = 100;
|
||||
pidProfile->yawRateAccelLimit = 10.0f;
|
||||
pidProfile->rateAccelLimit = 0.0f;
|
||||
pidProfile->itermThrottleThreshold = 350;
|
||||
|
|
|
@ -160,7 +160,7 @@ void pidInitConfig(const pidProfile_t *pidProfile) {
|
|||
Ki[axis] = ITERM_SCALE * pidProfile->I8[axis];
|
||||
Kd[axis] = DTERM_SCALE * pidProfile->D8[axis];
|
||||
}
|
||||
dtermSetpointWeight = pidProfile->dtermSetpointWeight / 100.0f;
|
||||
dtermSetpointWeight = pidProfile->dtermSetpointWeight / 127.0f;
|
||||
relaxFactor = 1.0f / (pidProfile->setpointRelaxRatio / 100.0f);
|
||||
levelGain = pidProfile->P8[PIDLEVEL] / 10.0f;
|
||||
horizonGain = pidProfile->I8[PIDLEVEL] / 10.0f;
|
||||
|
|
Loading…
Reference in New Issue