do not update desired setpoints and waypoints if the oa is disabled

This commit is contained in:
Martina Rivizzigno
2019-05-29 15:16:33 +02:00
committed by Matthias Grob
parent 0963dc9af1
commit 1e8582974c
4 changed files with 12 additions and 10 deletions
@@ -86,10 +86,11 @@ bool FlightTaskAutoMapper::update()
_generateVelocitySetpoints();
}
_obstacle_avoidance.updateAvoidanceDesiredSetpoints(_position_setpoint, _velocity_setpoint);
_obstacle_avoidance.injectAvoidanceSetpoints(_position_setpoint, _velocity_setpoint, _yaw_setpoint,
_yawspeed_setpoint);
if (_param_com_obs_avoid.get()) {
_obstacle_avoidance.updateAvoidanceDesiredSetpoints(_position_setpoint, _velocity_setpoint);
_obstacle_avoidance.injectAvoidanceSetpoints(_position_setpoint, _velocity_setpoint, _yaw_setpoint,
_yawspeed_setpoint);
}
// during mission and reposition, raise the landing gears but only
// if altitude is high enough