Bibliotheques TP RT  1.0
Bibliotheque de support pour TP/RT
definitions.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2018 dimercur
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
27 #ifndef DEFINITIONS_H
28 #define DEFINITIONS_H
29 
30 #define OPEN_COM_DMB 'o'
31 #define CLOSE_COM_DMB 'C'
32 
33 #define DMB_PING 'p'
34 #define DMB_IDLE 'r'
35 #define DMB_START_WITHOUT_WD 'u'
36 #define DMB_START_WITH_WD 'W'
37 #define DMB_RELOAD_WD 'w'
38 #define DMB_GET_VBAT 'v'
39 #define DMB_IS_BUSY 'b'
40 #define DMB_MOVE 'M'
41 #define DMB_TURN 'T'
42 #define DMB_GO_FORWARD 'F'
43 #define DMB_GO_BACK 'B'
44 #define DMB_GO_LEFT 'L'
45 #define DMB_GO_RIGHT 'R'
46 #define DMB_STOP_MOVE 'S'
47 
48 #define ROBOT_TIMED_OUT -3
49 #define ROBOT_UKNOWN_CMD -2
50 #define ROBOT_ERROR -1
51 #define ROBOT_CHECKSUM -4
52 #define ROBOT_OK 0
53 
54 #define CAM_OPEN 'A'
55 #define CAM_CLOSE 'I'
56 #define CAM_ASK_ARENA 'y'
57 #define CAM_ARENA_CONFIRM 'x'
58 #define CAM_ARENA_INFIRM 'z'
59 #define CAM_COMPUTE_POSITION 'p'
60 #define CAM_STOP_COMPUTE_POSITION 's'
61 
62 #define DMB_BAT_LOW 0
63 #define DMB_BAT_MEDIUM 1
64 #define DMB_BAT_HIGH 2
65 
66 #define DMB_BUSY 1
67 #define DMB_DO_NOTHING 0
68 
69 #endif /* MSG_H */
70