From db2e1398127aaeb359d77ab010bfbfc1cc051e69 Mon Sep 17 00:00:00 2001 From: "tridge60@gmail.com" Date: Sat, 9 Jul 2011 22:27:15 +0000 Subject: [PATCH] fixed 5843 detection code we were looking for the wrong regA value Thanks to Chris for the debugging help! (and happy birthday!) git-svn-id: https://arducopter.googlecode.com/svn/trunk@2828 f9c3cf11-9bcb-44bc-f272-b75c42450872 --- libraries/AP_Compass/AP_Compass_HMC5843.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_Compass/AP_Compass_HMC5843.cpp b/libraries/AP_Compass/AP_Compass_HMC5843.cpp index 25cfb73406..c7f061b950 100644 --- a/libraries/AP_Compass/AP_Compass_HMC5843.cpp +++ b/libraries/AP_Compass/AP_Compass_HMC5843.cpp @@ -108,7 +108,7 @@ AP_Compass_HMC5843::init() calibration_gain = 0x60; expected_xy = 766; expected_z = 713; - } else if (base_config == PositiveBiasConfig) { + } else if (base_config == NormalOperation | DataOutputRate_75HZ<<2) { product_id = AP_COMPASS_TYPE_HMC5843; } else { // not behaving like either supported compass type