From 3f3fb0c01c5b63c8231048d2242b8ad8d9c7ef4b Mon Sep 17 00:00:00 2001 From: Michael Keller Date: Wed, 6 Jun 2018 11:21:11 +1200 Subject: [PATCH] Changed 'dtermSetpointWeight' to use decimal scaling. --- src/main/flight/pid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/flight/pid.c b/src/main/flight/pid.c index 4462f7db1e..6dd62ae7c9 100644 --- a/src/main/flight/pid.c +++ b/src/main/flight/pid.c @@ -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 {