From d93429f5a10cf8e40994874403864d986b44837b Mon Sep 17 00:00:00 2001 From: razvanm Date: Wed, 28 Oct 2009 19:11:15 +0000 Subject: [PATCH] Switch to the new LowPowerListening interface. --- apps/AntiTheft/Nodes/AntiTheftC.nc | 4 ++-- apps/AntiTheft/Nodes/Makefile | 6 ++++++ apps/AntiTheft/Root/AntiTheftRootC.nc | 2 +- apps/AntiTheft/Root/Makefile | 6 ++++++ 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/apps/AntiTheft/Nodes/AntiTheftC.nc b/apps/AntiTheft/Nodes/AntiTheftC.nc index 1e42baa3..3d502a92 100644 --- a/apps/AntiTheft/Nodes/AntiTheftC.nc +++ b/apps/AntiTheft/Nodes/AntiTheftC.nc @@ -138,13 +138,13 @@ implementation } /* Radio started. Now start the collection protocol and set the - radio to a 2% low-power-listening duty cycle */ + wakeup interval for low-power-listening wakeup to half a second. */ event void RadioControl.startDone(error_t ok) { if (ok == SUCCESS) { call DisseminationControl.start(); call CollectionControl.start(); - call LowPowerListening.setLocalDutyCycle(200); + call LowPowerListening.setLocalWakeupInterval(512); } else errorLed(); diff --git a/apps/AntiTheft/Nodes/Makefile b/apps/AntiTheft/Nodes/Makefile index 6d49bff8..f05ae3be 100644 --- a/apps/AntiTheft/Nodes/Makefile +++ b/apps/AntiTheft/Nodes/Makefile @@ -1,5 +1,11 @@ SENSORBOARD=mts300 PFLAGS += -I%T/lib/net/ctp -I%T/lib/net -I%T/lib/net/4bitle -I%T/lib/net/drip COMPONENT=AntiTheftAppC + +#CFLAGS += -DLOW_POWER_LISTENING +#CFLAGS += -DLPL_DEF_LOCAL_WAKEUP=512 +#CFLAGS += -DLPL_DEF_REMOTE_WAKEUP=512 +#CFLAGS += -DDELAY_AFTER_RECEIVE=20 + include $(MAKERULES) diff --git a/apps/AntiTheft/Root/AntiTheftRootC.nc b/apps/AntiTheft/Root/AntiTheftRootC.nc index 896bc812..ada387b5 100644 --- a/apps/AntiTheft/Root/AntiTheftRootC.nc +++ b/apps/AntiTheft/Root/AntiTheftRootC.nc @@ -55,7 +55,7 @@ implementation tree */ if (error == SUCCESS) { - call LowPowerListening.setLocalDutyCycle(200); + call LowPowerListening.setLocalWakeupInterval(512); call DisseminationControl.start(); call CollectionControl.start(); call RootControl.setRoot(); diff --git a/apps/AntiTheft/Root/Makefile b/apps/AntiTheft/Root/Makefile index 247c8a0d..4719dcfc 100644 --- a/apps/AntiTheft/Root/Makefile +++ b/apps/AntiTheft/Root/Makefile @@ -1,4 +1,10 @@ PFLAGS += -I%T/lib/net/ctp -I%T/lib/net -I%T/lib/net/4bitle -I%T/lib/net/drip COMPONENT=AntiTheftRootAppC + +#CFLAGS += -DLOW_POWER_LISTENING +#CFLAGS += -DLPL_DEF_LOCAL_WAKEUP=512 +#CFLAGS += -DLPL_DEF_REMOTE_WAKEUP=512 +#CFLAGS += -DDELAY_AFTER_RECEIVE=20 + include $(MAKERULES) -- 2.39.2