bolderflight / invensense-imu

Arduino and CMake library for communicating with the InvenSense MPU-6500, MPU-9250 and MPU-9255 nine-axis IMUs.
MIT License
508 stars 213 forks source link

ACCEL_RANGE is ignored #42

Closed maikischa closed 3 years ago

maikischa commented 5 years ago

When I set the Accel Range with IMU.setAccelRange(MPU9250::ACCEL_RANGE_4G); the statement is ignored and all readings I get are limited to 20 m/s/s (2G). I have tried different ranges but always get only maximum 2G readings.

maikischa commented 5 years ago

In addition I found out that the ACCEL_RANGE is only rested to 2G if I run IMU.calibrateAccel().

It seems that IMU.calibrateAccel() resets the ACCEL_RANGE to 2G

ChisholmKyle commented 4 years ago

I noticed in the code the calibrate functions do not properly restore settings after changing them for the calibration. I made a fix in pull request #76 which should actually restore settings.

flybrianfly commented 3 years ago

Removed calibration from the library, the accel range should be set correctly now.