Skip to content
Snippets Groups Projects
Commit 190772ed authored by Karim Keddam's avatar Karim Keddam
Browse files

Fixed error with temperature computation

parent 522d8917
No related branches found
No related tags found
No related merge requests found
......@@ -589,7 +589,7 @@ static int ms58xx_measure(FAR struct ms58xx_dev_s *priv)
return ret;
}
diff = (int32_t)rawtemp - (int32_t)priv->c5 / ((int32_t)1 << 8);
diff = (int32_t)rawtemp - (int32_t)priv->c5 * ((int32_t)1 << 8);
temp = (int32_t)((int64_t)2000 +
(int64_t)diff * (int64_t)priv->c6 / ((int64_t)1 << 23));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment