X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Fchips%2Frf2xx%2Flayers%2FLowPowerListeningLayerP.nc;h=3030f26b078b1828022a5aee646ac15a01abbc58;hb=49cc8fcafaeab25abbf27e0636a18985a2996654;hp=12fd1cfea7716554e63c109faa47f37c05ab7a90;hpb=cb3f6de287765685644f43833564b07330085e5e;p=tinyos-2.x.git diff --git a/tos/chips/rf2xx/layers/LowPowerListeningLayerP.nc b/tos/chips/rf2xx/layers/LowPowerListeningLayerP.nc index 12fd1cfe..3030f26b 100644 --- a/tos/chips/rf2xx/layers/LowPowerListeningLayerP.nc +++ b/tos/chips/rf2xx/layers/LowPowerListeningLayerP.nc @@ -52,14 +52,16 @@ module LowPowerListeningLayerP implementation { +#ifndef LPL_DEF_LOCAL_WAKEUP +#define LPL_DEF_LOCAL_WAKEUP 0 +#endif + enum { // minimum wakeup time to catch a transmission in milliseconds LISTEN_WAKEUP = 6U, // use xxxL if LISTEN_WAKEUP * 10000 > 65535 MIN_SLEEP = 2, // the minimum sleep interval in milliseconds - MAX_SLEEP = 30000, // the maximum sleep interval in milliseconds - MIN_DUTY = 2, // the minimum duty cycle }; uint16_t sleepInterval = LPL_DEF_LOCAL_WAKEUP; @@ -352,8 +354,6 @@ implementation { if( interval < MIN_SLEEP ) interval = 0; - else if( interval > MAX_SLEEP ) - interval = MAX_SLEEP; sleepInterval = interval; @@ -374,8 +374,6 @@ implementation { if( interval < MIN_SLEEP ) interval = 0; - else if( interval > MAX_SLEEP ) - interval = MAX_SLEEP; getMeta(msg)->sleepint = interval; }