implementation
{
- components MainC, RadioCountToDiagP, DiagMsgC;
+ components MainC, RadioCountToDiagP, DiagMsgC, LedsC;
components ActiveMessageC, SerialActiveMessageC;
components new TimerMilliC() as SendTimerC;
components new TimerMilliC() as ReportTimerC;
RadioCountToDiagP.ActiveMessageAddress -> ActiveMessageAddressC;
RadioCountToDiagP.LowPowerListening -> ActiveMessageC;
+
+ RadioCountToDiagP.Leds -> LedsC;
}
interface ActiveMessageAddress;
interface LowPowerListening;
+
+ interface Leds;
}
}
#ifndef SEND_PERIOD
-#define SEND_PERIOD 10
+#define SEND_PERIOD 20
#endif
#ifndef SLEEP_INTERVAL
event void ReportTimer.fired()
{
+ call Leds.led0Toggle();
+
if( call DiagMsg.record() )
{
call DiagMsg.uint16(sendCount);
{
uint16_t addr;
+ call Leds.led1Toggle();
+
call Packet.clear(&txMsg);
call PacketAcknowledgements.requestAck(&txMsg);
#ifdef LOW_POWER_LISTENING