AP_AHRS: fixed check of accel sensor health

we need to check health of each accelerometer separately
This commit is contained in:
Andrew Tridgell 2014-05-15 22:18:56 +10:00
parent 5edf4ba596
commit 315290029a

View File

@ -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;
}