Revision 60b98383
ID | 60b98383db2ff491312e634ed125fd32cea188c7 |
Committing some clean ups done in the linefollowing behaviours
scout/libscout/src/behaviors/lineDrive.h | ||
---|---|---|
1 |
#ifndef _LINE_DRIVE_ |
|
2 |
#define _LINE_DRIVE_ |
|
1 |
#ifndef _LINE_DRIVE_H_
|
|
2 |
#define _LINE_DRIVE_H_
|
|
3 | 3 |
|
4 | 4 |
#include "../Behavior.h" |
5 | 5 |
#include "lineFollow.h" |
... | ... | |
24 | 24 |
#define LOST -3 |
25 | 25 |
#define ERROR -4 |
26 | 26 |
|
27 |
class lineDrive : Behavior{
|
|
28 |
lineDrive (String scoutname): Behavior(scoutname){};
|
|
27 |
class line_drive : Behavior{
|
|
28 |
line_drive(String scoutname);
|
|
29 | 29 |
run(); |
30 | 30 |
|
31 |
void lineDrive_init(void);
|
|
31 |
void line_drive_init(void);
|
|
32 | 32 |
|
33 | 33 |
int doDrive(int speed); |
34 | 34 |
|
... | ... | |
36 | 36 |
void stop(void); |
37 | 37 |
|
38 | 38 |
|
39 |
int turn(int type, int dir); |
|
39 |
int turn(int type, iint dir); |
|
40 |
|
|
41 |
private: |
|
42 |
int state[5]; //! Stores a queue of sub-commands to be executed |
|
43 |
int stateCounter; |
|
44 |
int stateLength; |
|
45 |
|
|
46 |
//! Whether line_drive is currently paused. Set to 0 on initialization. |
|
47 |
int stopped=1; |
|
48 |
|
|
49 |
}; |
|
40 | 50 |
|
41 |
} |
|
42 | 51 |
#endif |
Also available in: Unified diff