Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 7:981f83911b0c, committed 2019-02-15
- Comitter:
 - taknokolat
 - Date:
 - Fri Feb 15 11:26:30 2019 +0000
 - Parent:
 - 6:5c0cebb61b0f
 - Commit message:
 - a
 
Changed in this revision
| HMC5883L.cpp | Show annotated file Show diff for this revision Revisions of this file | 
--- a/HMC5883L.cpp	Thu Feb 07 06:13:40 2019 +0000
+++ b/HMC5883L.cpp	Fri Feb 15 11:26:30 2019 +0000
@@ -133,7 +133,7 @@
 {
     int16_t raw_data[3];
     getXYZ(raw_data);
-    double heading = atan2(static_cast<double>(raw_data[2]+Calib_x), static_cast<double>(raw_data[0])+Calib_y); // heading = arctan(Y/X)
+    double heading = atan2(static_cast<double>(raw_data[0]+Calib_x), static_cast<double>(raw_data[2])+Calib_y); // heading = arctan(Y/X)
     
     // TODO: declenation angle compensation