You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the documentation, with lowering of the resolution, the least significant bits become meaningless, but the conversion factor has to be the same i.e. you should always divide by 16.
let temperature = match resolution {Resolution::Bits12 => (raw_temp asf32) / 16.0,Resolution::Bits11 => (raw_temp asf32) / 16.0,Resolution::Bits10 => (raw_temp asf32) / 16.0,Resolution::Bits9 => (raw_temp asf32) / 16.0,};
The text was updated successfully, but these errors were encountered:
I believe the temperature conversion is incorrect at:
https://github.com/fuchsnj/ds18b20/blob/master/src/lib.rs#:~:text=let%20temperature%20%3D,%7D%3B
According to the documentation, with lowering of the resolution, the least significant bits become meaningless, but the conversion factor has to be the same i.e. you should always divide by 16.
The text was updated successfully, but these errors were encountered: