rust-embedded / rust-i2cdev

Rust library for interfacing with i2c devices under Linux
Apache License 2.0
207 stars 53 forks source link

Add Altimeter trait and default implementaiton #30

Closed lily-mara closed 7 years ago

lily-mara commented 7 years ago

This creates a trait for Altimeter sensors, providing altitude readings in meters. There is also a default implementation specified for any type that implements Barometer. I also fixed some documentation that implied some functions had different return types than what they really do.

posborne commented 7 years ago

Thanks, we'll probably be moving some of these traits out of this library into separate crates at a point, but I see no reason not to merge this until I get around to making those other changes. See https://github.com/rust-embedded/rust-i2cdev/pull/28