1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-20 23:05:19 +03:00

Soften the lower setpoint transition

This commit is contained in:
borisbstyle 2017-02-14 22:44:10 +01:00
parent ecc26428fb
commit a135e9cbb2
2 changed files with 2 additions and 2 deletions

View file

@ -271,7 +271,7 @@ void pidController(const pidProfile_t *pidProfile, const rollAndPitchTrims_t *an
} else {
float dynC = dtermSetpointWeight;
if (pidProfile->setpointRelaxRatio < 100) {
dynC *= MIN(getRcDeflectionAbs(axis) * relaxFactor, 1.0f);
dynC *= MIN(sq(getRcDeflectionAbs(axis)) * relaxFactor, 1.0f);
}
const float rD = dynC * currentPidSetpoint - gyroRate; // cr - y
// Divide rate change by dT to get differential (ie dr/dt)