]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
Correct mph calculations in AnemometerP.nc for Davis aerovane.
authorsmckown <smckown@4bc1554a-c7f2-4f65-a403-e0be01f0239c>
Wed, 4 Nov 2009 03:55:01 +0000 (03:55 +0000)
committerR. Steve McKown <rsmckown@gmail.com>
Tue, 1 Dec 2009 03:01:45 +0000 (20:01 -0700)
tos/platforms/tmirws/sensors/AnemometerP.nc

index 40f8fc3f8bf0de2a07c6942a6d74f142363ccfcb..dfb1bae697b58fbb5b2ae09620f80b6ee6a0a15b 100644 (file)
@@ -55,7 +55,7 @@ implementation {
   /* Convert counts per second to mph */
   uint8_t toMph(uint8_t cps)
   {
-    return (uint8_t)(2.453 * (cps >> 1) + 0.5);
+    return 2.25 * cps + 0.5;
   }