Merge pull request #6052 from mikeller/change_setpoint_weight_to_decimal_scaling

Changed 'dtermSetpointWeight' to use decimal scaling.
This commit is contained in:
Michael Keller 2018-06-07 23:38:16 +12:00 committed by GitHub
commit 7936fb07d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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,
@ -393,7 +393,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 {