Compass sensor library

Dependents:   compassDemo weather_station_proj weather_station_project weather_station_proj_v1_2

Revision:
3:c2cd6cc71ee2
Parent:
2:4debef04091d
--- a/HMC5983.cpp	Thu Jul 05 17:57:00 2018 +0000
+++ b/HMC5983.cpp	Thu Jul 05 17:59:23 2018 +0000
@@ -225,8 +225,8 @@
 
     // compose byte for X, Y, Z's LSB & MSB 8bit registers
     H[0] = (uint16_t(X_MSB) << 8) | X_LSB;
-    H[1] = (uint16_t(Z_MSB) << 8) | Z_LSB;
-    H[2] = (uint16_t(Y_MSB) << 8) | Y_LSB;
+    H[1] = (uint16_t(Y_MSB) << 8) | Y_LSB;
+    H[2] = (uint16_t(Z_MSB) << 8) | Z_LSB;
 }
 
 void HMC5983::computeCalibratedHeadingVector(float *v)