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

dterm_setpoint_weight to uint16_t

dterm_setpoint_weight changet to uint16 with limit 0-2000
This commit is contained in:
supiiik 2018-05-23 08:39:45 +02:00
parent 6c15904a77
commit 76e3e7aded
6 changed files with 11 additions and 14 deletions

View file

@ -317,10 +317,7 @@ void pidInitConfig(const pidProfile_t *pidProfile)
pidCoefficient[axis].Kd = DTERM_SCALE * pidProfile->pid[axis].D;
}
dtermSetpointWeight = pidProfile->dtermSetpointWeight / 100.0f;
if (dtermSetpointWeight > 2.0f) {
dtermSetpointWeight = 10 * (dtermSetpointWeight - 2.0f) + 2.0f;
}
dtermSetpointWeight = pidProfile->dtermSetpointWeight / 127.0f;
if (pidProfile->setpointRelaxRatio == 0) {
relaxFactor = 0;
} else {