Skip to content
Snippets Groups Projects
Commit b018a608 authored by Matthias Grob's avatar Matthias Grob
Browse files

mc_pos_control: refactor OA setpoints out of PositionControl calls

parent c319ea71
No related branches found
No related tags found
No related merge requests found
......@@ -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");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment