Revision 1977
Fixed small bug in new main where if barcode was invalid, forgot to restart
motors for line following.
trunk/code/projects/traffic_navigation/traffic_navigation.h | ||
---|---|---|
1 | 1 |
#ifndef TRAFFIC_NAVIGATION_H |
2 | 2 |
|
3 | 3 |
/* Debug Options - These must go before includes */ |
4 |
#define MAIN_NEW /* compile the new main */
|
|
4 |
#define MAIN_NEW |
|
5 | 5 |
#define ORB_INTERSECTION |
6 | 6 |
|
7 | 7 |
#include <dragonfly_lib.h> |
trunk/code/projects/traffic_navigation/main-new.c | ||
---|---|---|
59 | 59 |
* -tailgating |
60 | 60 |
*/ |
61 | 61 |
#ifdef ORB_INTERSECTION |
62 |
orb1_set_color(ORB_OFF);
|
|
62 |
orb1_set_color(WHITE);
|
|
63 | 63 |
orb2_set_color(ORB_OFF); |
64 | 64 |
#endif |
65 |
start(); |
|
65 | 66 |
done = false; |
66 | 67 |
while(!done){ |
67 | 68 |
sign = doDrive(200); |
... | ... | |
160 | 161 |
|
161 | 162 |
case SINTERSECTION_ENTER_RESOLV: |
162 | 163 |
#ifdef ORB_INTERSECTION |
163 |
orb1_set_color(WHITE);
|
|
164 |
orb1_set_color(PURPLE);
|
|
164 | 165 |
orb2_set_color(ORB_OFF); |
165 | 166 |
#endif |
166 | 167 |
#ifdef DEBUG_INTERSECTION |
trunk/code/projects/traffic_navigation/main.c | ||
---|---|---|
8 | 8 |
#include "traffic_navigation.h" |
9 | 9 |
#include "../linefollowing/lineDrive.h" |
10 | 10 |
#ifndef MAIN_NEW |
11 |
#ifndef WIRELESSWATCH |
|
11 | 12 |
|
12 | 13 |
static int state, sign, dataLength, pingWaitTime, turnDir; |
13 | 14 |
static char sendBuffer[PACKET_LENGTH], prevBot, nextBot, id, nextDir, nextPath, intersectionNum; |
... | ... | |
267 | 268 |
} |
268 | 269 |
} |
269 | 270 |
#endif |
271 |
#endif |
Also available in: Unified diff