From c415c7fbc7727d1450ae6ec3c67e9cd9e88eb125 Mon Sep 17 00:00:00 2001 From: Oleksiy Protas Date: Mon, 18 Nov 2024 21:07:30 +0200 Subject: [PATCH] AP_Arming: typo fix in magnetic model check --- libraries/AP_Arming/AP_Arming.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_Arming/AP_Arming.cpp b/libraries/AP_Arming/AP_Arming.cpp index ffa148d6b5af1..4b058abe53605 100644 --- a/libraries/AP_Arming/AP_Arming.cpp +++ b/libraries/AP_Arming/AP_Arming.cpp @@ -582,11 +582,11 @@ bool AP_Arming::compass_checks(bool report) (double)MAX(fabsf(diff_mgauss.x), (double)fabsf(diff_mgauss.y)), (int)magfield_error_threshold); return false; } - if (fabsf(diff_mgauss.x) > magfield_error_threshold*2.0) { + if (fabsf(diff_mgauss.z) > magfield_error_threshold*2.0) { check_failed(ARMING_CHECK_COMPASS, report, "Check mag field (z diff:%.0f>%d)", (double)fabsf(diff_mgauss.z), (int)magfield_error_threshold*2); return false; - } + } } #endif // AP_AHRS_ENABLED }