eldruin / lsm303agr-rs

Platform agnostic Rust driver for the LSM303AGR ultra-compact high-performance eCompass module: ultra-low-power 3D accelerometer and 3D magnetometer
Apache License 2.0
18 stars 14 forks source link

Replace `Measurement` and `UnscaledMeasurement` with explicit `Acceleration` and `MagneticField` structs. #12

Closed reitermarkus closed 2 years ago

reitermarkus commented 2 years ago

Simplify the API by having only one method each for measuring, with the conversion (unscaled/mg/nT) being done by the explicit types.

Also included the changes from https://github.com/eldruin/lsm303agr-rs/pull/11.

reitermarkus commented 2 years ago

Added tests for the raw methods and a changelog entry.