Hi Raido,

Thanks for the bug report! Your analysis and description was very
helpful and I understand the problem. Your fix is correct, and I have
committed it to the mainline.

Best,
Miklos

On Tue, Jan 18, 2011 at 9:30 AM, Raido Pahtma <[email protected]> wrote:
> Hi,
>
> I'm playing around with changing the local wakeup interval of LPL during
> runtime and I noticed that if I set the wakeup interval to 0, to keep
> the radio on all the time and then put it back to a different value
> later, then the radio stays on and does not start duty-cycling.
> Duty-cycling only resumes after the node receives or sends a message. I
> believe the problem is with the setLocalWakeupInterval command:
>
>     command void LowPowerListening.setLocalWakeupInterval(uint16_t
> interval)
>     {
>         if( interval < MIN_SLEEP )
>             interval = 0;
>
>         sleepInterval = interval;
>
>         if( (state == LISTEN && sleepInterval == 0) || state ==
> SLEEP_WAIT )
>         {
>             call Timer.stop();
>             --state;
>             post transition();
>         }
>     }
>
> What happens is that state == LISTEN, but sleepInterval > 0 and the
> Timer is already stopped, so the only effect is the change in
> sleepInterval, but it is not acted upon. Cycling resumes once a send or
> receive restarts the timer. Removing sleepInterval == 0 from the if
> statement fixes the problem for me, but I'm not certain, that this is
> how it should be handled.
>
> Raido
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>

_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to