Copter: fixed EKF threshold for arming

when EKF failsafe is disabled by setting threshold to zero we need to
disable this arming check
This commit is contained in:
Andrew Tridgell 2019-09-22 16:30:41 +10:00
parent 5b434e814a
commit 7d5c36113d
1 changed files with 1 additions and 1 deletions

View File

@ -382,7 +382,7 @@ bool AP_Arming_Copter::gps_checks(bool display_failure)
Vector3f mag_variance;
Vector2f offset;
ahrs.get_variances(vel_variance, pos_variance, hgt_variance, mag_variance, tas_variance, offset);
if (mag_variance.length() >= copter.g.fs_ekf_thresh) {
if (copter.g.fs_ekf_thresh > 0 && mag_variance.length() >= copter.g.fs_ekf_thresh) {
check_failed(ARMING_CHECK_NONE, display_failure, "EKF compass variance");
return false;
}