yoelk / instrumentino

Instrumentino is an open-source modular graphical user interface framework for controlling Arduino based experimental instruments
GNU General Public License v3.0
137 stars 59 forks source link

V2 idea for action classes #29

Open yoelk opened 8 years ago

yoelk commented 8 years ago

The parent Action class should let sub-classes implement two methods:

on_start will do the usual command and on_stop will contain code to finish the action, in case the user pressed STOP during its operation. The STOP will trigger an event that the parent Action class will listen to and stop the on_start operation. This can be also communicated with an interrupt instead, which might be a better choice.