root / trunk / code / projects / diagnostic_station / station / comm_robot.h @ 1279
History | View | Annotate | Download (933 Bytes)
1 | 1159 | deffi | #ifndef _robot_comm_h
|
---|---|---|---|
2 | #define _robot_comm_h
|
||
3 | |||
4 | 1218 | deffi | #include <wireless.h> |
5 | |||
6 | 1198 | deffi | void comm_robot_init (void); |
7 | |||
8 | 1205 | deffi | char *motor_direction_string (uint8_t direction);
|
9 | 1198 | deffi | |
10 | 1159 | deffi | void robot_set_orbs (uint8_t red1, uint8_t green1, uint8_t blue1, uint8_t red2, uint8_t green2, uint8_t blue2);
|
11 | void robot_set_motors (uint8_t direction1, uint8_t speed1, uint8_t direction2, uint8_t speed2);
|
||
12 | 1226 | deffi | void robot_set_motors_time (uint8_t direction1, uint8_t speed1, uint8_t direction2, uint8_t speed2, uint16_t time_ms);
|
13 | 1182 | deffi | void robot_set_motors_off (void); |
14 | 1159 | deffi | void robot_set_bom (uint16_t bitmask);
|
15 | 1219 | deffi | void robot_reset_encoders (void); |
16 | 1212 | deffi | |
17 | 1218 | deffi | bool robot_read_encoders (int16_t *left, int16_t *right);
|
18 | 1245 | deffi | bool robot_read_bom (uint8_t num, uint16_t *value);
|
19 | bool robot_read_rangefinder (uint8_t num, uint16_t *value);
|
||
20 | 1279 | deffi | bool robot_read_bom_all (uint16_t *value);
|
21 | 1212 | deffi | |
22 | 1205 | deffi | #define motor_direction_off 0 |
23 | #define motor_direction_forward 1 |
||
24 | #define motor_direction_backward 2 |
||
25 | 1159 | deffi | |
26 | |||
27 | #endif |