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

Implement the manufacturer self-tests #33

Open BartMassey opened 1 month ago

BartMassey commented 1 month ago

It would be nice to have the manufacturer self tests from section 4.1.5 and 4.2.4 of the LSM303AGR datasheet available as methods in this crate. I have a micro:bit v2 with a broken (probably just massively hard-iron miscalibrated) magnetometer, and it took quite a thing to notice it and figure it out. Would prefer to just call a self-test and note failure…

I'll work on this when I get time, but it may be a while. Hopefully someone will beat me to it.

eldruin commented 1 month ago

That would be great, thanks!