mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-12-23 03:51:55 +00:00
Refactor LinearFSM triggers to have different names
This commit is contained in:
parent
6113149c58
commit
4842574cf3
@ -7,6 +7,6 @@ from .fsm_base import FSMBase
|
||||
class LinearFSM(FSMBase):
|
||||
def __init__(self, number_of_steps):
|
||||
self.states = list(map(str, range(number_of_steps)))
|
||||
self.transitions = [{'trigger': 'step', 'source': index, 'dest': str(int(index)+1)}
|
||||
self.transitions = [{'trigger': 'step_{}'.format(int(index)+1), 'source': index, 'dest': str(int(index)+1)}
|
||||
for index in self.states[:-1]]
|
||||
super(LinearFSM, self).__init__()
|
||||
|
Loading…
Reference in New Issue
Block a user