Project

General

Profile

Statistics
| Branch: | Revision:

root / scout / libscout / src / behaviors / lineDrive.h @ 9295436d

History | View | Annotate | Download (650 Bytes)

1
#ifndef _LINE_DRIVE_
2
#define _LINE_DRIVE_
3

    
4
#include "lineFollow.h"
5

    
6
/*
7
 * Defines whether your making a turn from the main two-way road
8
 * or from a one-way sub road.
9
*/
10
#define ON_ROAD                0
11
#define OFF_ROAD        0
12

    
13
/*
14
 * The type of turn you are making from the road you are on.
15
*/
16
#define ISTRAIGHT        0
17
#define ILEFT                1
18
#define IRIGHT                2
19
#define IUTURN                3
20

    
21
#define NORMAL                -1
22
#define FINISHED        -2
23
#define LOST                -3
24
#define ERROR                -4
25

    
26
class lineDrive : Behavior{
27
        lineDrive (String scoutname): Behavior(scoutname){};
28
        run();
29

    
30
        void lineDrive_init(void);
31

    
32
        int doDrive(int speed);
33

    
34
        void start(void);
35
        void stop(void);
36

    
37

    
38
        int turn(int type, int dir);
39

    
40
}
41
#endif