mirror of https://github.com/ArduPilot/ardupilot
AC_AttitudeControl: Prevent DCM fallback from triggering a flyaway
This commit is contained in:
parent
428682c8e9
commit
334ff0fb66
|
@ -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…
Reference in New Issue