roneos
Operating System for the r-one robot
 All Data Structures Files Functions Variables Typedefs Groups
bump_sensor.h
Go to the documentation of this file.
1 
10 #ifndef BUMP_SENSOR_H_
11 #define BUMP_SENSOR_H_
12 
13 /******** Defines ********/
14 
15 /* default numbering scheme starts at front-right, increases CCW */
16 #define BUMP_FL_BIT 0x01
17 #define BUMP_LF_BIT 0x02
18 #define BUMP_LB_BIT 0x04
19 #define BUMP_BL_BIT 0x08
20 #define BUMP_BR_BIT 0x10
21 #define BUMP_RB_BIT 0x20
22 #define BUMP_RF_BIT 0x40
23 #define BUMP_FR_BIT 0x80
24 
25 /******** Functions ********/
26 
27 /*
28  * @brief Update bump sensors from the MSP communications message.
29  *
30  * bumpSensorBearing set to -1.
31  * @param new_values the bump sensor value
32  * @returns void
33  */
34 void bumpSensorsUpdate(uint8 new_values);
35 
36 
42 uint8 bumpSensorsGetBits();
43 
44 
50 int16 bumpSensorsGetBearing();
51 
52 
65 uint8 bumpSensorsWhichHit();
66 
67 //TODO: implement or delete?
68 void bumper_debug_print();
69 
70 #endif /* BUMP_SENSOR_H_ */