praneshkmr / node-lsm303

Node.js Library for LSM303
MIT License
7 stars 7 forks source link

Fix transposed properties from buffToXYZMag method #11

Closed damoclark closed 7 years ago

damoclark commented 7 years ago

Hey Pranesh,

Another quick PR.

The property values for y and z were transposed by mistake in this method. This is corrected in this commit.

damoclark commented 7 years ago

Hey Pranesh,

I've just returned to this and realised that this PR is incorrect, so I'm going to delete it.

After further review, the LSM303 sensor strangely (for the LSM303DLHC model) has the order of x,z,y when reading the magnetometer, but for the accelerometer, uses x,y,z. So your original code is quite correct.