summaryrefslogtreecommitdiff
path: root/digital/io/src/top_cb.c
blob: acad13a5ff5d695bca7c49ae3f642fae7702dd5f (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
/*
 * 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_JACK_IN
 *   nothing to do.
 */
fsm_branch_t
top__IDLE__start (void)
{
    return top_next (IDLE, start);
}

/*
 * WAIT_JACK_IN =jack_inserted_into_bot=>
 *  => WAIT_JACK_OUT
 *   configure the asserv board.
 */
fsm_branch_t
top__WAIT_JACK_IN__jack_inserted_into_bot (void)
{
    return top_next (WAIT_JACK_IN, jack_inserted_into_bot);
}

/*
 * WAIT_JACK_OUT =jack_removed_from_bot=>
 *  => GET_PUCK_FROM_THE_GROUND
 *   the match start, start the chronometer
 */
fsm_branch_t
top__WAIT_JACK_OUT__jack_removed_from_bot (void)
{
    /* Start the chronometer */
    chrono_init ();
    return top_next (WAIT_JACK_OUT, jack_removed_from_bot);
}