mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 17:13:33 +08:00
do not update desired setpoints and waypoints if the oa is disabled
This commit is contained in:
committed by
Matthias Grob
parent
0963dc9af1
commit
1e8582974c
@@ -89,8 +89,8 @@ void ObstacleAvoidance::injectAvoidanceSetpoints(Vector3f &pos_sp, Vector3f &vel
|
||||
float &yaw_speed_sp)
|
||||
{
|
||||
|
||||
if (!COM_OBS_AVOID.get() || _sub_vehicle_status->get().nav_state == vehicle_status_s::NAVIGATION_STATE_AUTO_LOITER) {
|
||||
// if avoidance disabled or in failsafe nav_state LOITER, don't inject setpoints from avoidance system
|
||||
if (_sub_vehicle_status->get().nav_state == vehicle_status_s::NAVIGATION_STATE_AUTO_LOITER) {
|
||||
// if in failsafe nav_state LOITER, don't inject setpoints from avoidance system
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user