Browse Source

mc_pos_control: if triplet not valid in z ignore it

sbg
Dennis Mannhart 8 years ago
parent
commit
e0d81b4c5e
  1. 3
      src/modules/mc_pos_control/mc_pos_control_main.cpp

3
src/modules/mc_pos_control/mc_pos_control_main.cpp

@ -1398,8 +1398,6 @@ void MulticopterPositionControl::control_auto(float dt) @@ -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) @@ -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.

Loading…
Cancel
Save