Changed 'dtermSetpointWeight' to use decimal scaling.

This commit is contained in:
Michael Keller 2018-06-06 11:21:11 +12:00
parent 445f9d6ad4
commit 3f3fb0c01c
1 changed files with 2 additions and 2 deletions

View File

@ -125,7 +125,7 @@ void resetPidProfile(pidProfile_t *pidProfile)
.pidAtMinThrottle = PID_STABILISATION_ON,
.levelAngleLimit = 55,
.setpointRelaxRatio = 100,
.dtermSetpointWeight = 0,
.dtermSetpointWeight = 45,
.yawRateAccelLimit = 100,
.rateAccelLimit = 0,
.itermThrottleThreshold = 350,
@ -390,7 +390,7 @@ void pidInitConfig(const pidProfile_t *pidProfile)
pidCoefficient[axis].Kd = DTERM_SCALE * pidProfile->pid[axis].D;
}
dtermSetpointWeight = pidProfile->dtermSetpointWeight / 127.0f;
dtermSetpointWeight = pidProfile->dtermSetpointWeight / 100.0f;
if (pidProfile->setpointRelaxRatio == 0) {
relaxFactor = 0;
} else {