mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-02 00:51:36 +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;
|
||||
}
|
||||
|
||||
|
||||
@@ -109,7 +109,6 @@ private:
|
||||
uORB::Subscription<vehicle_status_s> *_sub_vehicle_status{nullptr}; /**< vehicle status subscription */
|
||||
|
||||
DEFINE_PARAMETERS(
|
||||
(ParamInt<px4::params::COM_OBS_AVOID>) COM_OBS_AVOID, /**< obstacle avoidance enabled */
|
||||
(ParamFloat<px4::params::NAV_MC_ALT_RAD>) NAV_MC_ALT_RAD /**< Acceptance radius for multicopter altitude */
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user