LSM303DLHC

Fork of LSM303DLHC by brian claus

Files at this revision

API Documentation at this revision

Comitter:
Spilly
Date:
Tue Mar 17 01:12:28 2015 +0000
Parent:
4:612f7d5a822d
Commit message:
Update

Changed in this revision

LSM303DLHC.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 612f7d5a822d -r 386547b2ee70 LSM303DLHC.cpp
--- a/LSM303DLHC.cpp	Thu Feb 21 00:20:17 2013 +0000
+++ b/LSM303DLHC.cpp	Tue Mar 17 01:12:28 2015 +0000
@@ -117,8 +117,11 @@
         //full scale magnetic readings are from -2048 to 2047
         //gain is x,y =1100; z = 980 LSB/gauss
         *mx = float(short(mag[0] << 8 | mag[1]))/1100;
+        //*mx = float(short(mag[0] << 8 | mag[1]))/450;
         *mz = float(short(mag[2] << 8 | mag[3]))/980;
+        //*mz = float(short(mag[2] << 8 | mag[3]))/400;
         *my = float(short(mag[4] << 8 | mag[5]))/1100;
+        //*my = float(short(mag[4] << 8 | mag[5]))/450;
  
         return true;
     }