diff --git a/src/lib/FlightTasks/tasks/FlightTaskAuto.hpp b/src/lib/FlightTasks/tasks/FlightTaskAuto.hpp index c5d6d07401..44a451d15c 100644 --- a/src/lib/FlightTasks/tasks/FlightTaskAuto.hpp +++ b/src/lib/FlightTasks/tasks/FlightTaskAuto.hpp @@ -92,7 +92,6 @@ protected: WaypointType _type{WaypointType::idle}; /**< Type of current target triplet. */ uORB::Subscription *_sub_home_position{nullptr}; - State _current_state{State::none}; float _speed_at_target = 0.0f; /**< Desired velocity at target. */ @@ -100,9 +99,9 @@ protected: DEFINE_PARAMETERS_CUSTOM_PARENT(FlightTask, (ParamFloat) MPC_XY_CRUISE, (ParamFloat) MPC_CRUISE_90, // speed at corner when angle is 90 degrees move to line - (ParamFloat) NAV_ACC_RAD // acceptance radius at which waypoints are updated move to line - ); /**< Default mc cruise speed.*/ - + (ParamFloat) NAV_ACC_RAD, // acceptance radius at which waypoints are updated move to line + (ParamInt) MPC_YAW_MODE // defines how heading is executed + ); private: matrix::Vector2f _lock_position_xy{NAN, NAN}; /**< if no valid triplet is received, lock positition to current position */ @@ -126,4 +125,5 @@ private: bool _evaluateGlobalReference(); /**< Check is global reference is available. */ float _getVelocityFromAngle(const float angle); /**< Computes the speed at target depending on angle. */ State _getCurrentState(); /**< Computes the current vehicle state based on the vehicle position and navigator triplets. */ + void _set_heading_from_mode(); /**< @see MPC_YAW_MODE */ };