From: smckown Date: Mon, 9 Nov 2009 19:30:50 +0000 (+0000) Subject: When using a Timer in AeroVaneReadP, we don't need to post a task to read vane. X-Git-Tag: release/2.1.0-2~14 X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=commitdiff_plain;h=99d0f62fa02893cadde6f86f632b10bcead90657 When using a Timer in AeroVaneReadP, we don't need to post a task to read vane. --- diff --git a/tos/platforms/tmirws/sensors/AeroVaneReadP.nc b/tos/platforms/tmirws/sensors/AeroVaneReadP.nc index 319614ac..906679b7 100644 --- a/tos/platforms/tmirws/sensors/AeroVaneReadP.nc +++ b/tos/platforms/tmirws/sensors/AeroVaneReadP.nc @@ -62,8 +62,6 @@ implementation { int m_vane; int m_sum; - task void readVane(); - void init() { m_count = 0; @@ -100,18 +98,21 @@ implementation { } #if 0 + task void readVane(); + async event void Alarm.fired() -#else - event void Timer.fired() -#endif { - //call Alarm.start(call Alarm.getAlarm() + period); + call Alarm.start(call Alarm.getAlarm() + period); post readVane(); } task void readVane() { //call Alarm.start(call Alarm.getAlarm() + period); +#else + event void Timer.fired() + { +#endif if (!(call State.isIdle())) call Read.read(); }