Project

General

Profile

Statistics
| Revision:

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

History | View | Annotate | Download (667 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
/* this is what is in the robot shared memory */
22
typedef struct RobotSharedType
23
{
24
        short motor1; /* motor1 value */
25
        short motor2; /* motor2 value */
26
        RangeFinder ranges; /* rangefinders */
27
        /* add other sensors, etc here */
28
} RobotShared;
29

    
30
#endif
31