reset waypoints when switching to fw pos_ctrl mode

This commit is contained in:
tumbili
2015-05-23 10:20:38 +02:00
committed by Lorenz Meier
parent 0e11f1632c
commit 8b6593495c
@@ -1303,6 +1303,7 @@ FixedwingPositionControl::control_position(const math::Vector<2> &current_positi
/* Need to init because last loop iteration was in a different mode */
_hold_alt = _global_pos.alt;
_hdg_hold_yaw = _att.yaw;
_hdg_hold_enabled = false; // this makes sure the waypoints are reset below
}
/* Reset integrators if switching to this mode from a other mode in which posctl was not active */
if (_control_mode_current == FW_POSCTRL_MODE_OTHER) {