FlightTaskManual: move all setpoints into base class

This commit is contained in:
Dennis Mannhart 2018-02-15 11:10:23 +01:00 committed by Beat Küng
parent 2e9cb659c9
commit 2db2ef824b

View File

@ -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<manual_control_setpoint_s> *_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 */
};