Re: Trellis: tasks and discrete sensors

"Phillip J. Eby" <pje-Wh6+Hckhi6HFNGf7iClzIwC/[email protected]>
Newsgroups gmane.comp.python.peak
Message-ID <[email protected]>
At 08:03 PM 10/9/2008 +0300, Sergey Schetinin wrote:
>This test shows that @task rules never get to see discrete values. It
>prints 'waiting' twice, so they are triggered, but sensor value is
>None both times.

This is a documented limitation, or at least it should be documented.  :)

Tasks can't read discrete values because a task step cannot be 
"undone".  This is why they are only run from the system event 
loop.  If you need to communicate discrete events to a task, you will 
need to write them to a list or something of that sort, and then have 
the task read and remove them.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.