Revision 1902
Edited the .h and .c file so that global variables can be seen by other files with the .h file is included.
highways.c | ||
---|---|---|
2 | 2 |
#include "lineDrive.h" |
3 | 3 |
#include <dragonfly_lib.h> |
4 | 4 |
|
5 |
static int counti =0;
|
|
6 |
static long averagei = 0;
|
|
7 |
static int states = 0;
|
|
5 |
int counti =0; |
|
6 |
long averagei = 0; |
|
7 |
int states = 0; |
|
8 | 8 |
int canMerge = 1; |
9 | 9 |
|
10 | 10 |
void highwayStart(){ |
11 | 11 |
canMerge = 1; |
12 | 12 |
} |
13 |
int changeLanes(){ |
|
13 |
static int changeLanes(){
|
|
14 | 14 |
if(counti<10000){ |
15 | 15 |
counti++; |
16 | 16 |
motor_r_set(FORWARD,232); |
Also available in: Unified diff