From 315290029a82d9364f474dd8657c6ec60d0d4bb7 Mon Sep 17 00:00:00 2001
From: Andrew Tridgell <tridge@samba.org>
Date: Thu, 15 May 2014 22:18:56 +1000
Subject: [PATCH] AP_AHRS: fixed check of accel sensor health

we need to check health of each accelerometer separately
---
 libraries/AP_AHRS/AP_AHRS_DCM.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libraries/AP_AHRS/AP_AHRS_DCM.cpp b/libraries/AP_AHRS/AP_AHRS_DCM.cpp
index 10a5738cd..2216af40e 100644
--- a/libraries/AP_AHRS/AP_AHRS_DCM.cpp
+++ b/libraries/AP_AHRS/AP_AHRS_DCM.cpp
@@ -619,7 +619,7 @@ AP_AHRS_DCM::drift_correction(float deltat)
     int8_t besti = -1;
     float best_error = 0;
     for (uint8_t i=0; i<_ins.get_accel_count(); i++) {
-        if (!_ins.get_accel_health()) {
+        if (!_ins.get_accel_health(i)) {
             // only use healthy sensors
             continue;
         }
-- 
GitLab