root / branches / simulator / projects / simulator / common / robot_shared.h @ 1044
History | View | Annotate | Download (853 Bytes)
1 | 988 | bcoltin | /**
|
---|---|---|---|
2 | * @file robot_shared.h
|
||
3 | * @author Colony Project
|
||
4 | *
|
||
5 | * @brief Shared simulator structures.
|
||
6 | *
|
||
7 | * This file is for structures that are used by
|
||
8 | * both the simulator and the simulator library which
|
||
9 | * is linked to by robot programs.
|
||
10 | **/
|
||
11 | 950 | bcoltin | |
12 | 982 | ayeager | #ifndef __ROBOT_SHARED_H
|
13 | #define __ROBOT_SHARED_H
|
||
14 | 950 | bcoltin | |
15 | 972 | dsschult | /* rangefinders are 1-5, so write convert function for this */
|
16 | typedef struct RangeFinderType |
||
17 | 964 | dsschult | { |
18 | 988 | bcoltin | short d[5]; |
19 | 972 | dsschult | } RangeFinder; |
20 | 964 | dsschult | |
21 | 1037 | dsschult | /* BOM has 16 leds, 0 - 15, with 0 pointing to the right
|
22 | increasing in index counterclockwise */
|
||
23 | typedef struct BOMType |
||
24 | { |
||
25 | short led[16]; |
||
26 | short bom_on;
|
||
27 | } BOMs; |
||
28 | |||
29 | 977 | dsschult | /* this is what is in the robot shared memory */
|
30 | 950 | bcoltin | typedef struct RobotSharedType |
31 | { |
||
32 | 964 | dsschult | short motor1; /* motor1 value */ |
33 | short motor2; /* motor2 value */ |
||
34 | 988 | bcoltin | RangeFinder ranges; /* rangefinders */
|
35 | 1037 | dsschult | BOMs bom; /* BOM */
|
36 | 988 | bcoltin | /* add other sensors, etc here */
|
37 | 950 | bcoltin | } RobotShared; |
38 | |||
39 | 988 | bcoltin | #endif
|