Browse Source

AC_AttitudeControl: Prevent DCM fallback from triggering a flyaway

master
Michael du Breuil 7 years ago committed by Randy Mackay
parent
commit
334ff0fb66
  1. 2
      libraries/AC_AttitudeControl/AC_PosControl.cpp

2
libraries/AC_AttitudeControl/AC_PosControl.cpp

@ -1185,7 +1185,7 @@ void AC_PosControl::check_for_ekf_z_reset() @@ -1185,7 +1185,7 @@ void AC_PosControl::check_for_ekf_z_reset()
// check for position shift
float alt_shift;
uint32_t reset_ms = _ahrs.getLastPosDownReset(alt_shift);
if (reset_ms != _ekf_z_reset_ms) {
if (reset_ms != 0 && reset_ms != _ekf_z_reset_ms) {
shift_alt_target(-alt_shift * 100.0f);
_ekf_z_reset_ms = reset_ms;
}

Loading…
Cancel
Save