Switch #define for Z_MSB/Z_LSB and Y_MSB/Y_LSB. Per the datasheet it's X, Z, Y not X, Y, Z

Fork of HMC5883L by GM AT

Files at this revision

API Documentation at this revision

Comitter:
AlpNov
Date:
Thu Dec 03 19:19:20 2015 +0000
Parent:
0:cad18db1e431
Commit message:
Switched HMC5883L_Z_MSB/LSB and HMC5883L_Y_MSB/LSB as per the datasheet: https://aerospace.honeywell.com/~/media/Images/Plymouth%20Website%20PDFs/Magnetic%20Sensors/Data%20Sheets/HMC5883L_3-Axis_Digital_Compass_IC.ashx

Changed in this revision

HMC5883L.h Show annotated file Show diff for this revision Revisions of this file
diff -r cad18db1e431 -r 77d45010744d HMC5883L.h
--- a/HMC5883L.h	Thu Dec 12 02:25:11 2013 +0000
+++ b/HMC5883L.h	Thu Dec 03 19:19:20 2015 +0000
@@ -99,10 +99,10 @@
 #define HMC5883L_MODE         0x02
 #define HMC5883L_X_MSB        0x03
 #define HMC5883L_X_LSB        0x04
-#define HMC5883L_Y_MSB        0x05
-#define HMC5883L_Y_LSB        0x06
-#define HMC5883L_Z_MSB        0x07
-#define HMC5883L_Z_LSB        0x08
+#define HMC5883L_Z_MSB        0x05
+#define HMC5883L_Z_LSB        0x06
+#define HMC5883L_Y_MSB        0x07
+#define HMC5883L_Y_LSB        0x08
 #define HMC5883L_STATUS       0x09
 #define HMC5883L_IDENT_A      0x0A
 #define HMC5883L_IDENT_B      0x0B