Skip to content

Commit

Permalink
need to possibly div by resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
robamu committed Jun 24, 2024
1 parent 35d9584 commit e612e63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ impl<I2C: I2c> Lis2dh12<I2C> {
let (out_h, out_l) = self.get_temp_out()?;
// 10-bit resolution
let value = (i16(out_h) << 8) | i16(out_l);
Ok(25.0 + f32(value))
Ok(25.0 + f32(value) / 256.0)
}

/// `REFERENCE` register
Expand Down

0 comments on commit e612e63

Please sign in to comment.