mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-31 17:41:35 +08:00
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:
committed by
Beat Küng
parent
8da2ff4d77
commit
55b6f19367
@@ -51,9 +51,7 @@ FlightTaskManualAltitude::FlightTaskManualAltitude(control::SuperBlock *parent,
|
||||
_vel_max_up(parent, "MPC_Z_VEL_MAX_UP", false),
|
||||
_yaw_rate_scaling(parent, "MPC_MAN_Y_MAX", false),
|
||||
_acc_max_up(parent, "MPC_ACC_UP_MAX", false),
|
||||
_acc_max_down(parent, "MPC_ACC_DOWN_MAX", false),
|
||||
_stick_deadzone(parent, "MPC_HOLD_DZ", false)
|
||||
|
||||
_acc_max_down(parent, "MPC_ACC_DOWN_MAX", false)
|
||||
{}
|
||||
|
||||
bool FlightTaskManualAltitude::activate()
|
||||
@@ -79,7 +77,7 @@ void FlightTaskManualAltitude::scaleSticks()
|
||||
|
||||
void FlightTaskManualAltitude::updateHeadingSetpoints()
|
||||
{
|
||||
if (fabsf(_sticks(3)) < _stick_deadzone.get()) {
|
||||
if (fabsf(_sticks(3)) < _hold_dz.get()) {
|
||||
/* Want to hold yaw */
|
||||
_yaw_rate_sp = NAN;
|
||||
_yaw_sp = _yaw_sp_predicted;
|
||||
@@ -93,7 +91,7 @@ void FlightTaskManualAltitude::updateHeadingSetpoints()
|
||||
|
||||
void FlightTaskManualAltitude::updateZsetpoints()
|
||||
{
|
||||
if (fabsf(_sticks(2)) < _stick_deadzone.get()) {
|
||||
if (fabsf(_sticks_expo(2)) < FLT_EPSILON) {
|
||||
|
||||
/* Want to hold altitude */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user