FlightTaskManual: remove stick_deadzone because base class already has it.

Remove deadzone check for vel in xy/z because expo already contains deadzone
This commit is contained in:
Dennis Mannhart
2017-12-22 21:01:06 +01:00
committed by Beat Küng
parent 8da2ff4d77
commit 55b6f19367
5 changed files with 7 additions and 21 deletions
+2 -13
View File
@@ -48,11 +48,9 @@ using namespace matrix;
FlightTaskManual::FlightTaskManual(control::SuperBlock *parent, const char *name) :
FlightTask(parent, name),
_z_vel_max_up(parent, "MPC_Z_VEL_MAX_UP", false),
_z_vel_max_down(parent, "MPC_Z_VEL_MAX_DN", false),
_hold_dz(parent, "MPC_HOLD_DZ", false),
_xy_vel_man_expo(parent, "MPC_XY_MAN_EXPO", false),
_z_vel_man_expo(parent, "MPC_Z_MAN_EXPO", false),
_hold_dz(parent, "MPC_HOLD_DZ", false)
_z_vel_man_expo(parent, "MPC_Z_MAN_EXPO", false)
{
}
@@ -126,15 +124,6 @@ void FlightTaskManual::_updateYaw()
_setYawSetpoint(_hold_yaw);
}
void FlightTaskManual::_scaleVelocity(Vector3f &velocity)
{
const Vector3f velocity_scale(_velocity_hor_manual.get(),
_velocity_hor_manual.get(),
(velocity(2) > 0.0f) ? _z_vel_max_down.get() : _z_vel_max_up.get());
velocity = velocity.emult(velocity_scale);
}
bool FlightTaskManual::_evaluateSticks()
{
if ((_time_stamp_current - _sub_manual_control_setpoint->get().timestamp) < _timeout) {