]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
Switch to the new LowPowerListening interface.
authorrazvanm <razvanm>
Wed, 28 Oct 2009 19:11:15 +0000 (19:11 +0000)
committerrazvanm <razvanm>
Wed, 28 Oct 2009 19:11:15 +0000 (19:11 +0000)
apps/AntiTheft/Nodes/AntiTheftC.nc
apps/AntiTheft/Nodes/Makefile
apps/AntiTheft/Root/AntiTheftRootC.nc
apps/AntiTheft/Root/Makefile

index 1e42baa3e7c2a0a99f18d8b5a5799ab936a6602e..3d502a929713062d388d1dd524f5501483391feb 100644 (file)
@@ -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();
index 6d49bff887097efc0c1cff5b6e00e6fd7e3308c5..f05ae3bea8d614e12e772466d7a5a4ad74816c52 100644 (file)
@@ -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)
 
index 896bc812a89d332afbeda66a391cc993f026316a..ada387b5ec1a9ba6750b5d8bf5b3b3c0c67996de 100644 (file)
@@ -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();
index 247c8a0d64d4306bc32aa78c030233dfae22ea75..4719dcfc59b970365356b971619d13a1e5da5487 100644 (file)
@@ -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)