Revision 1998
Fixed issue where if bot had no other bot in front it would still wait the time
for the imaginary bot in front to drive out of intersection.
trunk/code/projects/traffic_navigation/main-new.c | ||
---|---|---|
227 | 227 |
|
228 | 228 |
DBG_USBS("STATE: SINTERSECTION_WAIT\n"); |
229 | 229 |
|
230 |
|
|
230 |
done = false; |
|
231 | 231 |
while(queuePrevBot != (char) -1){ |
232 |
done = true; |
|
232 | 233 |
int ret = wirelessPacketHandle(state); |
233 | 234 |
switch (ret){ |
234 | 235 |
case KFIRSTINQUEUE: |
... | ... | |
252 | 253 |
//hack to make sure bot that just left intersection is |
253 | 254 |
//really out of the intersection. |
254 | 255 |
rtc_reset(); |
255 |
while(rtc_get() < 16){//wait one second
|
|
256 |
while(rtc_get() < 4 && done){//wait one second
|
|
256 | 257 |
wirelessPacketHandle(state); |
257 | 258 |
} |
258 | 259 |
|
Also available in: Unified diff