From 7a111d47d7ffe5930b7f757acb1381362c393176 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 11 Aug 2024 15:20:05 +1000 Subject: [PATCH] Copter: cope with AHRS backends with no variances --- ArduCopter/AP_Arming.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ArduCopter/AP_Arming.cpp b/ArduCopter/AP_Arming.cpp index 119971f059c31..7393291c0f9c3 100644 --- a/ArduCopter/AP_Arming.cpp +++ b/ArduCopter/AP_Arming.cpp @@ -480,7 +480,7 @@ bool AP_Arming_Copter::mandatory_gps_checks(bool display_failure) // check EKF's compass, position, height and velocity variances are below failsafe threshold if (copter.g.fs_ekf_thresh > 0.0f) { - float vel_variance, pos_variance, hgt_variance, tas_variance; + float vel_variance=0, pos_variance=0, hgt_variance=0, tas_variance=0; Vector3f mag_variance; ahrs.get_variances(vel_variance, pos_variance, hgt_variance, mag_variance, tas_variance); if (mag_variance.length() >= copter.g.fs_ekf_thresh) {