mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 00:35:39 +03:00
Changed 'dtermSetpointWeight' to use decimal scaling.
This commit is contained in:
parent
445f9d6ad4
commit
3f3fb0c01c
1 changed files with 2 additions and 2 deletions
|
@ -125,7 +125,7 @@ void resetPidProfile(pidProfile_t *pidProfile)
|
||||||
.pidAtMinThrottle = PID_STABILISATION_ON,
|
.pidAtMinThrottle = PID_STABILISATION_ON,
|
||||||
.levelAngleLimit = 55,
|
.levelAngleLimit = 55,
|
||||||
.setpointRelaxRatio = 100,
|
.setpointRelaxRatio = 100,
|
||||||
.dtermSetpointWeight = 0,
|
.dtermSetpointWeight = 45,
|
||||||
.yawRateAccelLimit = 100,
|
.yawRateAccelLimit = 100,
|
||||||
.rateAccelLimit = 0,
|
.rateAccelLimit = 0,
|
||||||
.itermThrottleThreshold = 350,
|
.itermThrottleThreshold = 350,
|
||||||
|
@ -390,7 +390,7 @@ void pidInitConfig(const pidProfile_t *pidProfile)
|
||||||
pidCoefficient[axis].Kd = DTERM_SCALE * pidProfile->pid[axis].D;
|
pidCoefficient[axis].Kd = DTERM_SCALE * pidProfile->pid[axis].D;
|
||||||
}
|
}
|
||||||
|
|
||||||
dtermSetpointWeight = pidProfile->dtermSetpointWeight / 127.0f;
|
dtermSetpointWeight = pidProfile->dtermSetpointWeight / 100.0f;
|
||||||
if (pidProfile->setpointRelaxRatio == 0) {
|
if (pidProfile->setpointRelaxRatio == 0) {
|
||||||
relaxFactor = 0;
|
relaxFactor = 0;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue