diff --git a/src/lib/FlightTasks/tasks/FlightTaskManual.hpp b/src/lib/FlightTasks/tasks/FlightTaskManual.hpp index c67c9f32b5..33dce897b7 100644 --- a/src/lib/FlightTasks/tasks/FlightTaskManual.hpp +++ b/src/lib/FlightTasks/tasks/FlightTaskManual.hpp @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (c) 2017 PX4 Development Team. All rights reserved. + * Copyright (c) 2018 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -63,6 +63,15 @@ protected: matrix::Vector3f _sticks_expo; /**< modified manual sticks using expo function*/ control::BlockParamFloat _stick_dz; /**< 0-deadzone around the center for the sticks */ + /* Setpoints: NAN means that setpoint is not being considered. */ + matrix::Vector3f _thr_sp{NAN, NAN, NAN}; /**< thrust setpoint */ + matrix::Vector3f _vel_sp{NAN, NAN, NAN}; /**< velocity setpoint */ + matrix::Vector3f _pos_sp{NAN, NAN, NAN}; /**< position setpoint */ + float _yaw_sp{NAN}; /**< yaw setpoint */ + float _yaw_rate_sp{NAN}; /**< yawspeed setpoint */ + + void _resetToNAN(); + private: uORB::Subscription *_sub_manual_control_setpoint{nullptr}; @@ -70,6 +79,5 @@ private: control::BlockParamFloat _xy_vel_man_expo; /**< ratio of exponential curve for stick input in xy direction */ control::BlockParamFloat _z_vel_man_expo; /**< ratio of exponential curve for stick input in z direction */ - bool _evaluateSticks(); /**< checks and sets stick inputs */ };