aseba-community / thymio-vpl2

Next generation VPL for Thymio using Qt Quick from Qt 5.x
GNU Lesser General Public License v3.0
2 stars 5 forks source link

Integrator variable #100

Open stephanemagnenat opened 7 years ago

stephanemagnenat commented 7 years ago

It might be interesting, as an alternative to, or in complement in, the FSM mode (see #51) and the enumeration variables (see #90), to support an integrator.

An integrator would be an integer variable, whose initial value and speed of change would be set in an action block, and whose value crossing a threshold could be tested in an event block. In that sense, it would be somewhat similar to the timer in VPL1, but would be more flexible. Properly implemented, it could allow interesting activities especially at the level of bio-inspired algorithms, for instance synchronised blinking like fireflies or Grey Walter's tortoises.

Here is a proposed detailed set of operations:

I envision the value to wrap around, simply mapping it to an int16.

Here is an example of design: vpl2-integrator