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.
Diff: HMC5883L.cpp
- Revision:
- 7:38050f18f60a
- Parent:
- 6:5c0cebb61b0f
- Child:
- 8:8b6e984df00b
diff -r 5c0cebb61b0f -r 38050f18f60a HMC5883L.cpp
--- a/HMC5883L.cpp Thu Feb 07 06:13:40 2019 +0000
+++ b/HMC5883L.cpp Fri Nov 15 12:19:58 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