fxbox / thinkerbell

A scripting engine for the Foxbox
http://fxbox.github.io/thinkerbell/doc/foxbox_thinkerbell/index.html
2 stars 6 forks source link

Implement countdowns #34

Open Yoric opened 8 years ago

Yoric commented 8 years ago

Implementing a countdown as a device looks tricky, as this means:

Moreover, the effort looks unnecessary, as we do not have other kinds of devices that support such situation yet.

One way to implement this would be to make countdowns specific to Thinkerbell, e.g. by adding an optional field since to conditions. With this argument, a trigger is executed only if the conditions remain true for the entire duration.

Side-benefit: this may be useful for sensors that are a bit too sensitive.

Blocks

Yoric commented 8 years ago

Note that, to make this compatible with the simulator, we will need to add a timer to the ExecutionEnv.