Implemented first Hangar-Service

Dependencies:   CalibrateMagneto QuaternionMath

Fork of SML2 by TobyRich GmbH

Revision:
13:bc20290eaff2
Parent:
12:1632d7391453
Child:
14:d9fbb3ccd482
--- a/Magnetometer.cpp	Fri Mar 13 09:12:56 2015 +0000
+++ b/Magnetometer.cpp	Mon Mar 16 12:39:09 2015 +0000
@@ -70,8 +70,8 @@
     //read_reg(0x40, buffer, 4);
 
     // Datasheet is wrong, BMX055 magneto x and y axis are interchanged and y axis is inverted !!!
+    const int16_t mdata_y = *(reinterpret_cast<const int16_t*>(buffer + 0)) / -8;
     const int16_t mdata_x = *(reinterpret_cast<const int16_t*>(buffer + 2)) / 8;
-    const int16_t mdata_y = *(reinterpret_cast<const int16_t*>(buffer + 0)) / -8;
     const int16_t mdata_z = *(reinterpret_cast<const int16_t*>(buffer + 4)) / 2;
     const uint16_t data_r = *(reinterpret_cast<const uint16_t*>(buffer + 6)) / 4;
     int16_t temp; // temporary