Project

General

Profile

Statistics
| Revision:

root / branches / simulator / projects / simulator / common / robot_shared.h @ 1037

History | View | Annotate | Download (853 Bytes)

1
/**
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

    
12
#ifndef __ROBOT_SHARED_H
13
#define __ROBOT_SHARED_H
14

    
15
/* rangefinders are 1-5, so write convert function for this */
16
typedef struct RangeFinderType
17
{
18
        short d[5];
19
} RangeFinder;
20

    
21
/* 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
/* this is what is in the robot shared memory */
30
typedef struct RobotSharedType
31
{
32
        short motor1; /* motor1 value */
33
        short motor2; /* motor2 value */
34
        RangeFinder ranges; /* rangefinders */
35
        BOMs bom; /* BOM */
36
        /* add other sensors, etc here */
37
} RobotShared;
38

    
39
#endif
40