Skip to content
Snippets Groups Projects
Commit 96f57eb0 authored by Gregory Nutt's avatar Gregory Nutt
Browse files

Merged in karim_keddam/nuttx (pull request #39)

Fixed error with temperature computation
parents 3af1def4 190772ed
No related branches found
No related tags found
No related merge requests found
......@@ -598,7 +598,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