summaryrefslogtreecommitdiffhomepage
path: root/digital/io/src/gutter.fsm
blob: 6faa340d58c91f390d8fcb08bf225e4cb8959df2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#FSM gutter
gutter

States:
 START
 GO_TO_GUTTER
 OPEN_COLLECTOR
 CLOSE_COLLECTOR
 END

Events:
 ok
 position_reached
 position_failed
 collector_opened
 collector_closed

START:
 ok -> GO_TO_GUTTER
  Go to the gutter.

GO_TO_GUTTER:
 position_reached -> OPEN_COLLECTOR
  The robo is near the gutter and the door can be opened.
 position_failed -> .
  The position failed, shall try another path.

OPEN_COLLECTOR:
 collector_opened -> CLOSE_COLLECTOR
  Wait some time and clse the door.

CLOSE_COLLECTOR:
 collector_closed-> END
  The samples has been inserted in the gutter.