Hacker News new | ask | show | jobs
by MarkSweep 1943 days ago
At a previous company we used statemachines to debounce signals, implement protocols, and sequence robot moves. While they were designed so that the actions executed on state entry were pluggable (i.e. all action were executed by calling through a C# interfaxe), in practice we did not use it. Instead were abstracted at a slightly higher level: components that wrapped statemachines with some extra logic and nice APIs. The inputs for the statemachines were also pluggable, so different sources of digital inputs or motor control could be used.