X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Fplatforms%2Ftmirws%2Fsensors%2FAnemometerP.nc;h=dfb1bae697b58fbb5b2ae09620f80b6ee6a0a15b;hb=5cc70a3e4e0011533504832dc5da948983184e42;hp=40f8fc3f8bf0de2a07c6942a6d74f142363ccfcb;hpb=27368506d8de3c90708726891e85f0ff090b3945;p=tinyos-2.x.git diff --git a/tos/platforms/tmirws/sensors/AnemometerP.nc b/tos/platforms/tmirws/sensors/AnemometerP.nc index 40f8fc3f..dfb1bae6 100644 --- a/tos/platforms/tmirws/sensors/AnemometerP.nc +++ b/tos/platforms/tmirws/sensors/AnemometerP.nc @@ -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; }