FlightTaskAuto: check avoidance progress only if avoidance is active

This commit is contained in:
Martina 2018-08-07 14:36:35 +02:00 committed by Lorenz Meier
parent cef7673969
commit ba4e633bd4
2 changed files with 5 additions and 2 deletions

View File

@ -221,7 +221,9 @@ bool FlightTaskAuto::_evaluateTriplets()
_updateAvoidanceWaypoints();
}
_checkAvoidanceProgress();
if (MPC_OBS_AVOID.get()) {
_checkAvoidanceProgress();
}
return true;
}

View File

@ -109,7 +109,8 @@ protected:
(ParamFloat<px4::params::MPC_CRUISE_90>) MPC_CRUISE_90, // speed at corner when angle is 90 degrees move to line
(ParamFloat<px4::params::NAV_ACC_RAD>) NAV_ACC_RAD, // acceptance radius at which waypoints are updated move to line
(ParamFloat<px4::params::NAV_MC_ALT_RAD>) NAV_MC_ALT_RAD, //vertical acceptance radius at which waypoints are updated
(ParamInt<px4::params::MPC_YAW_MODE>) MPC_YAW_MODE // defines how heading is executed
(ParamInt<px4::params::MPC_YAW_MODE>) MPC_YAW_MODE, // defines how heading is executed,
(ParamInt<px4::params::MPC_OBS_AVOID>) MPC_OBS_AVOID // obstacle avoidance active
);
private: