-
Notifications
You must be signed in to change notification settings - Fork 14
Description
When I set my program to get two reports at the same time, the reports are lowed down to a crawl
I'm trying to get myIMU.enableLinearAccelerometer()
and myIMU.enableRotationVector()
together to display them separately, however, as soon as I uncomment the second enable report, the sensor events for the Rotation Vector slow down to a crawl.
I set the console to print ROTATION at each Rotation Vector report and linear at each linearAcceleration report. Each line is a cycle. As you can see the rotation is much lower than linear. Without linear on, I get a rotation report at each cycle.
ROTATION
linear
linear
linear
linear
linear
linear
linear
ROTATION
linear
linear
linear
linear
linear
linear
linear
linear
linear
ROTATION
linear
linear
ROTATION
linear
linear
linear
linear
linear
ROTATION
linear
linear
linear
linear
linear
linear
linear
ROTATION
linear
linear
ROTATION
linear
linear
ROTATION
linear
linear
linear
linear
ROTATION
linear
linear
linear
linear
linear
linear
linear
linear
linear
linear
ROTATION
linear
linear
ROTATION
EDIT: SOLVED
I needed to add a refresh rate value like myIMU.enableLinearAccelerometer(25)
to lower the refresh rate of each report. I guess the linear acceleration was taking over the CPU of the IMU and preventing the calculation heavy rotation vector from ever happening. Limiting the Linear acceleration refresh rate allowed for the Rotation to report at a decent interval