1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-13 11:29:58 +03:00

exclude yaw from ff_max_rate_limit

This commit is contained in:
ctzsnooze 2019-09-20 00:32:42 +10:00
parent 031a21b9fc
commit 891b47e11e

View file

@ -102,11 +102,11 @@ FAST_CODE_NOINLINE float applyFfLimit(int axis, float value, float Kp, float cur
DEBUG_SET(DEBUG_FF_LIMIT, 0, value);
}
if (axis == FD_ROLL) {
if (axis == FD_PITCH) {
DEBUG_SET(DEBUG_FF_LIMIT, 1, value);
}
if (ffMaxRateLimit[axis]) {
if (ffMaxRateLimit[axis] && (axis < FD_YAW)) {
if (fabsf(currentPidSetpoint) <= ffMaxRateLimit[axis]) {
value = constrainf(value, (-ffMaxRateLimit[axis] - currentPidSetpoint) * Kp, (ffMaxRateLimit[axis] - currentPidSetpoint) * Kp);
} else {