AC_AttitudeControl: Prevent DCM fallback from triggering a flyaway

This commit is contained in:
Michael du Breuil 2018-03-30 21:20:29 -07:00 committed by Randy Mackay
parent 428682c8e9
commit 334ff0fb66
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}