mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 00:35:39 +03:00
Integer SETPOINT_RATE_LIMIT for STATIC_ASSERT().
This commit is contained in:
parent
e4cdb077b2
commit
2c1988f1f3
1 changed files with 3 additions and 3 deletions
|
@ -111,7 +111,7 @@ static int16_t rcLookupThrottle(int32_t tmp)
|
|||
return lookupThrottleRC[tmp2] + (tmp - tmp2 * 100) * (lookupThrottleRC[tmp2 + 1] - lookupThrottleRC[tmp2]) / 100;
|
||||
}
|
||||
|
||||
#define SETPOINT_RATE_LIMIT 1998.0f
|
||||
#define SETPOINT_RATE_LIMIT 1998
|
||||
STATIC_ASSERT(CONTROL_RATE_CONFIG_RATE_LIMIT_MAX <= SETPOINT_RATE_LIMIT, CONTROL_RATE_CONFIG_RATE_LIMIT_MAX_too_large);
|
||||
|
||||
#define RC_RATE_INCREMENTAL 14.54f
|
||||
|
@ -192,8 +192,8 @@ static void scaleRcCommandToFpvCamAngle(void)
|
|||
|
||||
float roll = setpointRate[ROLL];
|
||||
float yaw = setpointRate[YAW];
|
||||
setpointRate[ROLL] = constrainf(roll * cosFactor - yaw * sinFactor, -SETPOINT_RATE_LIMIT, SETPOINT_RATE_LIMIT);
|
||||
setpointRate[YAW] = constrainf(yaw * cosFactor + roll * sinFactor, -SETPOINT_RATE_LIMIT, SETPOINT_RATE_LIMIT);
|
||||
setpointRate[ROLL] = constrainf(roll * cosFactor - yaw * sinFactor, -SETPOINT_RATE_LIMIT * 1.0f, SETPOINT_RATE_LIMIT * 1.0f);
|
||||
setpointRate[YAW] = constrainf(yaw * cosFactor + roll * sinFactor, -SETPOINT_RATE_LIMIT * 1.0f, SETPOINT_RATE_LIMIT * 1.0f);
|
||||
}
|
||||
|
||||
#define THROTTLE_BUFFER_MAX 20
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue