Revision 733
reverted projects/template/ directory to pre-demo state. moved run_around demo code into behaviors/smart_run_around_fsm/ directory.
smart_run_around_fsm.h | ||
---|---|---|
13 | 13 |
#define LEFT 37 //Left |
14 | 14 |
#define RIGHT 39 //Right |
15 | 15 |
|
16 |
#define BACKUP_MAX 20
|
|
16 |
#define BACKUP_MAX 60
|
|
17 | 17 |
#define CRAZY_MAX 200 //The number of counts between "crazy moments" |
18 | 18 |
#define STRAIT_SPEED 185 //The speed when going strait or backing up. |
19 | 19 |
#define TURN_CONSTANT 2 |
20 | 20 |
#define PCONTROL_CRAZY_LIMIT 80 |
21 | 21 |
|
22 |
int avoid_state; /*State machine variable.*/ |
|
22 |
int avoid_state; |
|
23 |
int prev_state; /*State machine variable.*/ |
|
23 | 24 |
int crazy_count; /*Counter for a 'get unstuck' behavior.*/ |
24 | 25 |
|
25 | 26 |
int backup_count; /*Counter for backup duration.*/ |
Also available in: Unified diff