Revision 1966
Added test map data encoding to intersectData.c. Fixe a whole bunch of stuff so
that at least this traffic_navigation compiles without warnings. Symlinked to
needed files in linefollow. Changed function declaration style. Added
delclaration of read_line to analog.h. You're welcome. Fixed several #includes.
You're all welcome.
highways.c | ||
---|---|---|
1 | 1 |
#include "highways.h" |
2 |
#include "lineDrive.h" |
|
2 |
#include "../linefollowing/lineDrive.h"
|
|
3 | 3 |
#include <dragonfly_lib.h> |
4 | 4 |
|
5 |
static int changeLanes(void); // declared here to preserve static status |
|
6 |
|
|
5 | 7 |
int counti =0; |
6 | 8 |
long averagei = 0; |
7 | 9 |
int states = 0; |
... | ... | |
10 | 12 |
void highwayStart(){ |
11 | 13 |
canMerge = 1; |
12 | 14 |
} |
13 |
static int changeLanes(){ |
|
15 |
|
|
16 |
static int changeLanes() |
|
17 |
{ |
|
14 | 18 |
if(counti<10000){ |
15 | 19 |
counti++; |
16 | 20 |
motor_r_set(FORWARD,232); |
... | ... | |
28 | 32 |
counti = 0; |
29 | 33 |
return 1; |
30 | 34 |
} |
35 |
|
|
31 | 36 |
int highwayFSM(){ |
32 | 37 |
switch(states){ |
33 | 38 |
|
Also available in: Unified diff