From: Nathael Pajani Date: Mon, 12 Aug 2013 19:49:10 +0000 (+0200) Subject: Temp conversion was simpler, but not right for negativ values ... fixed X-Git-Url: http://git.techno-innov.fr/?a=commitdiff_plain;h=13d5a811679bf8dde66c5cb819d0b3393ab2ef71;p=soft%2Flpc122x%2Fcore Temp conversion was simpler, but not right for negativ values ... fixed --- 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