mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 15:28:53 +08:00
mc_pos_control: if triplet not valid in z ignore it
This commit is contained in:
@@ -1398,8 +1398,6 @@ void MulticopterPositionControl::control_auto(float dt)
|
||||
if (PX4_ISFINITE(_pos_sp_triplet.current.alt)) {
|
||||
_curr_pos_sp(2) = -(_pos_sp_triplet.current.alt - _ref_alt);
|
||||
|
||||
} else {
|
||||
_curr_pos_sp(2) = _pos(2);
|
||||
}
|
||||
|
||||
if (PX4_ISFINITE(_curr_pos_sp(0)) &&
|
||||
@@ -1552,7 +1550,6 @@ void MulticopterPositionControl::control_auto(float dt)
|
||||
_att_sp.yaw_body = _pos_sp_triplet.current.yaw;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* if we're already near the current takeoff setpoint don't reset in case we switch back to posctl.
|
||||
* this makes the takeoff finish smoothly.
|
||||
|
||||
Reference in New Issue
Block a user