From: smckown Date: Sat, 7 Nov 2009 23:58:55 +0000 (+0000) Subject: Add AeroVane infrastructure to support physical/reading of the sensor. X-Git-Tag: release/2.1.0-2~17 X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=commitdiff_plain;ds=sidebyside;h=7373db28ff8b66edda83925025fbffea6ed88148;hp=7373db28ff8b66edda83925025fbffea6ed88148;p=tinyos-2.x.git Add AeroVane infrastructure to support physical/reading of the sensor. AeroVaneReadC implements a timer every 28800 ticks of the 32KHz clock (or 900 binary ms). At each timer event it reads the wind vane via WindVaneReadC. On every 4th read it reads the anemometer via AnemometerReadC, calculates the average vane position over the last 4 reads (it's been summing all along), and uses Notify.notify() to send out the aerovector structure. This means that the user should get an AeroVane vector (reading) every 3.516 seconds, where both the direction and the speed have been averaged over 4 reads during that period. ---