bolderflight / invensense-imu

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

Many internal variables are used before initialization that prevent library to work if allocated on heap. #82

Closed ddv2005 closed 3 years ago

ddv2005 commented 3 years ago

Hello,

It is unbelievable but many internal variables are used before initialization. For example _gxb, _gyb, _gzb, _axb, _ayb. _azb . It can work if object placed in zero initiated memory block, but in release mode "new" operator always put object to UNINITIALIZED memory block and it does not work. ALL variables before use MUST be initialized even if it should be 0.

flybrianfly commented 3 years ago

Should be fixed now.