SparkFun_ADXL345_Arduino_Library icon indicating copy to clipboard operation
SparkFun_ADXL345_Arduino_Library copied to clipboard

g calculation correct for 2g range but wrong for other ranges

Open mgrusin opened this issue 8 years ago • 2 comments

The floating point gains built into the library are handy, but are correct only for the 2g range; you'll get erroneous results when using the .get_Gxyz() function and a range other than 2. A solution in .get_Gxyz() would be to multiply each result by (range/2), e.g. 8 for the 16g range.

mgrusin avatar Apr 07 '17 19:04 mgrusin

Want to set up a pull request @mgrusin ?

ToniCorinne avatar Apr 07 '17 21:04 ToniCorinne

You mean if I find a bug I have to fix it!? This changes everything.

Coming right up.

mgrusin avatar Apr 07 '17 22:04 mgrusin