1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 08:45:36 +03:00

Remove experimental square in relax calc

This commit is contained in:
borisbstyle 2017-02-19 00:13:44 +01:00
parent 0fb720b37e
commit 0b73e613c0
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(sq(getRcDeflectionAbs(axis)) * relaxFactor, 1.0f);
dynC *= MIN(getRcDeflectionAbs(axis) * relaxFactor, 1.0f);
}
const float rD = dynC * currentPidSetpoint - gyroRate; // cr - y
// Divide rate change by dT to get differential (ie dr/dt)