forked from Archive/PX4-Autopilot
mc_pos_control: refactor OA setpoints out of PositionControl calls
This commit is contained in:
parent
c319ea7189
commit
b018a6088d
|
@ -750,15 +750,15 @@ MulticopterPositionControl::run()
|
|||
limit_altitude(setpoint);
|
||||
}
|
||||
|
||||
// Update states, setpoints and constraints.
|
||||
_control.updateConstraints(constraints);
|
||||
_control.updateState(_states);
|
||||
|
||||
// adjust setpoints based on avoidance
|
||||
if (use_obstacle_avoidance()) {
|
||||
execute_avoidance_waypoint(setpoint);
|
||||
}
|
||||
|
||||
// Update states, setpoints and constraints.
|
||||
_control.updateConstraints(constraints);
|
||||
_control.updateState(_states);
|
||||
|
||||
// update position controller setpoints
|
||||
if (!_control.updateSetpoint(setpoint)) {
|
||||
warn_rate_limited("Position-Control Setpoint-Update failed");
|
||||
|
|
Loading…
Reference in New Issue