Skip to content

Commit 2b6f512

Browse files
committed
Degrees, Radians... whatever it takes! Fixes sparkfun#6 - Thx MichaelPriven
1 parent 1251c57 commit 2b6f512

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/SparkFunMPU9250-DMP.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ void MPU9250_DMP::computeEulerAngles(bool degrees)
656656
float MPU9250_DMP::computeCompassHeading(void)
657657
{
658658
if (my == 0)
659-
heading = (mx < 0) ? 180.0 : 0;
659+
heading = (mx < 0) ? PI : 0;
660660
else
661661
heading = atan2(mx, my);
662662

0 commit comments

Comments
 (0)