From 13d5a811679bf8dde66c5cb819d0b3393ab2ef71 Mon Sep 17 00:00:00 2001 From: Nathael Pajani Date: Mon, 12 Aug 2013 21:49:10 +0200 Subject: [PATCH] Temp conversion was simpler, but not right for negativ values ... fixed --- drivers/temp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/temp.c b/drivers/temp.c index 1e89cd5..7cb49be 100644 --- a/drivers/temp.c +++ b/drivers/temp.c @@ -89,7 +89,7 @@ int probe_sensor(void) */ int convert_to_deci_degrees(uint16_t raw) { - return (((int)raw * 10) >> 8); + return (((int16_t)raw * 10) >> 8); } /* Temp Read -- 2.43.0