summaryrefslogtreecommitdiffhomepage
path: root/digital/io/src/top_cb.c
blob: a10939d53f24d793461b450f5fd173d9eb0b0bb7 (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/*
 * THIS IS AN AUTOMATICALLY GENERATED FILE, DO NOT EDIT!
 *
 * Skeleton for top callbacks implementation.
 *
 * Top FSM with the Marcel's strategy
 */
#include "common.h"
#include "fsm.h"
#include "top_cb.h"
#include "chrono.h"
#include "asserv.h"
#include "playground.h"
#include "move.h"	/* move FSM */

/*
 * IDLE =start=>
 *  => WAIT_FIRST_JACK_IN
 *   nothing to do.
 */
fsm_branch_t
top__IDLE__start (void)
{
    return top_next (IDLE, start);
}

/*
 * WAIT_FIRST_JACK_IN =jack_inserted_into_bot=>
 *  => WAIT_FIRST_JACK_OUT
 *   nothing to do.
 */
fsm_branch_t
top__WAIT_FIRST_JACK_IN__jack_inserted_into_bot (void)
{
    return top_next (WAIT_FIRST_JACK_IN, jack_inserted_into_bot);
}

/*
 * WAIT_FIRST_JACK_OUT =jack_removed_from_bot=>
 *  => WAIT_SECOND_JACK_IN
 *   nothing to do.
 */
fsm_branch_t
top__WAIT_FIRST_JACK_OUT__jack_removed_from_bot (void)
{
    return top_next (WAIT_FIRST_JACK_OUT, jack_removed_from_bot);
}

/*
 * WAIT_SECOND_JACK_IN =jack_removed_from_bot=>
 *  => WAIT_SECOND_JACK_OUT
 *   nothing to do.
 */
fsm_branch_t
top__WAIT_SECOND_JACK_IN__jack_removed_from_bot (void)
{
    return top_next (WAIT_SECOND_JACK_IN, jack_removed_from_bot);
}

/*
 * WAIT_SECOND_JACK_OUT =jack_removed_from_bot=>
 *  => GET_PUCK_FROM_THE_GROUND
 *   the match start, try to get some puck from the ground.
 */
fsm_branch_t
top__WAIT_SECOND_JACK_OUT__jack_removed_from_bot (void)
{
    /* Start the chronometer */
    chrono_init ();
    return top_next (WAIT_SECOND_JACK_OUT, jack_removed_from_bot);
}