2017-12-06 01:29:09 +01:00

17 lines
366 B
Python

from fsm_base import FSMBase
class Buttons(FSMBase):
states = ['A', 'B', 'C']
transitions = [
{'trigger': 'anchor_a', 'source': 'A', 'dest': 'B'},
{'trigger': 'anchor_b', 'source': 'B', 'dest': 'C'},
{'trigger': 'anchor_c', 'source': 'C', 'dest': 'A'},
]
def __init__(self):
super().__init__('A')
fsm = Buttons()