Built from datasheet for 9-DOF sensor stick from SparkFun.
Dependents: 9Dof_unit_testing sparkfun6dof Seeed_Grove_Digital_Compass_Example CompassTest ... more
Revision 4:bc4e1201e092, committed 2012-11-06
- Comitter:
- tylerjw
- Date:
- Tue Nov 06 17:35:51 2012 +0000
- Parent:
- 3:14d274e0f9de
- Commit message:
- int changed to int16_t
Changed in this revision
HMC5883L.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/HMC5883L.cpp Tue Nov 06 17:25:45 2012 +0000 +++ b/HMC5883L.cpp Tue Nov 06 17:35:51 2012 +0000 @@ -131,7 +131,7 @@ double HMC5883L::getHeadingXY() { - int raw_data[3]; + int16_t raw_data[3]; getXYZ(raw_data); double heading = atan2(static_cast<double>(raw_data[1]), static_cast<double>(raw_data[0])); // heading = arctan(Y/X)