mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 14:43:34 +08:00
fw: make att controller more robust against invalid (nan) setpoints
This commit is contained in:
@@ -90,6 +90,11 @@ float ECL_YawController::control_attitude(float roll, float pitch,
|
||||
|
||||
// counter++;
|
||||
|
||||
if(!isfinite(_rate_setpoint)){
|
||||
warnx("yaw rate sepoint not finite");
|
||||
_rate_setpoint = 0.0f;
|
||||
}
|
||||
|
||||
return _rate_setpoint;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user