From b3251e2cfbfabd975f5e29d3de5a295f1fb6c06a Mon Sep 17 00:00:00 2001 From: peabody124 Date: Fri, 26 Nov 2010 15:57:13 +0000 Subject: [PATCH] AHRS: Accidentally was using mags when in indoor_nomag mode git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2159 ebee16cc-31ac-478f-84a7-5cbb03baadba --- flight/AHRS/ahrs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flight/AHRS/ahrs.c b/flight/AHRS/ahrs.c index 45a4a852a..82188e7b7 100644 --- a/flight/AHRS/ahrs.c +++ b/flight/AHRS/ahrs.c @@ -245,8 +245,8 @@ void ins_indoor_update() INSPosVelReset(vel,vel); else sensors = HORIZ_SENSORS | VERT_SENSORS; - - if(mag_data.updated) { + + if(mag_data.updated && (ahrs_algorithm == AHRSSETTINGS_ALGORITHM_INSGPS_INDOOR)) { sensors |= MAG_SENSORS; mag_data.updated = false; }