From 6d097569f2e25774c3ff7b08ac6258b751bfa4c2 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 24 Jun 2024 23:46:20 +0200 Subject: [PATCH] try to fix this --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 4c4a45a..251038a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -522,8 +522,8 @@ impl Lis2dh12 { pub fn get_temp_outf(&mut self) -> Result> { let (out_h, out_l) = self.get_temp_out()?; // 10-bit resolution - let value = (i16(out_h) << 2) | i16(out_l >> 6); - Ok(f32(value) * 0.25) + let value = (i16(out_h) << 8) | i16(out_l); + Ok(25 + f32(value) * 1) } /// `REFERENCE` register