From f0282bcd8fed1f3800c735d631275a6f816bae23 Mon Sep 17 00:00:00 2001 From: Dennis Mannhart Date: Mon, 23 Jul 2018 15:31:58 +0200 Subject: [PATCH] FlightTaskAuto/Line: make params protected and add NAC_ACC_RAD and MPC_YAW_MODE --- src/lib/FlightTasks/tasks/FlightTaskAuto.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 */ };