Revision 1164
Added message_set_motors_time
Added message_set_motors_off
comm_station_robot.h | ||
---|---|---|
1 | 1 |
#ifndef _comm_station_robot_h |
2 | 2 |
#define _comm_station_robot_h |
3 | 3 |
|
4 |
// TODO: define a channel and a PAN (and use it on both the robot and the station) |
|
4 |
// Macros for multibyte variables |
|
5 |
#define WORD_BYTE_0(word) ( word &0xFF) |
|
6 |
#define WORD_BYTE_1(word) ((word>>8)&0xFF) |
|
7 |
#define WORD(byte0, byte1) (byte1<<8 | byte0) |
|
5 | 8 |
|
6 |
// The message group (0..15) |
|
9 |
// The message group station -> robot (0..15)
|
|
7 | 10 |
#define station_robot_group 1 |
8 | 11 |
|
9 |
// The message types |
|
10 |
#define station_robot_set_orbs 1 |
|
11 |
#define station_robot_set_motors 2 |
|
12 |
#define station_robot_set_bom 3 |
|
13 |
// TODO: add motors off (and use everywhere) |
|
14 |
// TODO: add motors_for_some_time (and use in test_encoders) |
|
12 |
// The message types station -> robot |
|
13 |
#define station_robot_set_orbs 1 |
|
14 |
#define station_robot_set_motors 2 |
|
15 |
#define station_robot_set_bom 3 |
|
16 |
#define station_robot_set_motors_off 4 |
|
17 |
#define station_robot_set_motors_time 5 |
|
18 |
//#define station_robot_read_encoders 6 |
|
19 |
//... |
|
15 | 20 |
|
16 |
#define WORD_BYTE_0(word) ( word &0xFF) |
|
17 |
#define WORD_BYTE_1(word) ((word>>8)&0xFF) |
|
18 |
#define WORD(byte0, byte1) (byte1<<8 | byte0) |
|
21 |
#define robot_station_group 2 |
|
19 | 22 |
|
23 |
#define robot_station_finished 1 |
|
24 |
//#define robot_station_data_encoders 2 |
|
25 |
//... |
|
20 | 26 |
|
21 | 27 |
|
22 | 28 |
|
23 | 29 |
|
30 |
|
|
24 | 31 |
#endif |
Also available in: Unified diff