MagneticLight - Modified version based on ST Components

Dependencies:   PololuLedStrip X_NUCLEO_IKS01A1 mbed

Files at this revision

API Documentation at this revision

Comitter:
Arkadi
Date:
Tue Feb 07 14:37:17 2017 +0000
Parent:
2:94bf246f6a7b
Child:
4:b44bc6256182
Commit message:
Magnetic sensor axis alighment

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Tue Feb 07 14:16:00 2017 +0000
+++ b/main.cpp	Tue Feb 07 14:37:17 2017 +0000
@@ -206,9 +206,9 @@
             
             // update float ariables
             // axis adjustment to fit the previous setup, (visual aligment).
-            Mag_raw[0]=axesRaw[1];
+            Mag_raw[0]=-axesRaw[1];
             Mag_raw[1]=axesRaw[0];
-            Mag_raw[2]=axesRaw[2];
+            Mag_raw[2]=-axesRaw[2];
 
             // bias samples and scale
             Mag[0]=Mag_raw[0]-Mag_Bias[0];