kellerkindt / onewire

OneWire bus implementation in Rust using embedded-hal
Apache License 2.0
35 stars 14 forks source link

Support for spliting measures to integer and fraction. #2

Closed chernomor closed 5 years ago

chernomor commented 5 years ago

This PR allow to avoid division of measure. Instead we may split measure to two i16 values: integer and ten thousandth parts (fraction *10000).

P.S. May be I should not change signature of read_temperature() and should create read_temperature_raw()?

kellerkindt commented 5 years ago

Thanks. I am not entirely sure about the use case, but I am okay with merging it. Could you push another commit with ruftmt being executed?

chernomor commented 5 years ago

@kellerkindt are your means rustfmt? Yes, I could, but it formats not only my changes, but whole crate. If you accept this - it's ok.

kellerkindt commented 5 years ago

Well, I meant applying rustfmt afterwards. But i`ll do it after the merge, so I dont have to annoy you with that. Thanks for your contribution

chernomor commented 5 years ago

Oh, I applied rustfmt to crate, then picked my original commit and forgot to format it - I'm sorry :( Thanks for correcting my mistake!