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:
parent
031a21b9fc
commit
891b47e11e
1 changed files with 2 additions and 2 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue