From 5cc70a3e4e0011533504832dc5da948983184e42 Mon Sep 17 00:00:00 2001 From: smckown Date: Wed, 4 Nov 2009 03:55:01 +0000 Subject: [PATCH] Correct mph calculations in AnemometerP.nc for Davis aerovane. --- tos/platforms/tmirws/sensors/AnemometerP.nc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.39.2