Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/SparkFunMPU9250-DMP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -615,9 +615,9 @@ float MPU9250_DMP::qToFloat(long number, unsigned char q)
unsigned long mask = 0;
for (int i=0; i<q; i++)
{
mask |= (1<<i);
mask |= (1L<<i);
}
return (number >> q) + ((number & mask) / (float) (2<<(q-1)));
return (number >> q) + ((number & mask) / (float) (2L<<(q-1)));
}

void MPU9250_DMP::computeEulerAngles(bool degrees)
Expand Down Expand Up @@ -700,4 +700,4 @@ static void tap_cb(unsigned char direction, unsigned char count)
static void orient_cb(unsigned char orient)
{
mpu9250_orientation = orient;
}
}