Revision 1876 trunk/code/projects/traffic_navigation/main.c

View differences:

main.c
12 12
	int state, sign, dataLength, pingWaitTime;
13 13
	char sendBuffer[PACKET_LENGTH], prevBot, nextBot, id, nextDir, nextPath, intersectionNum;
14 14
	unsigned char *packet;
15

  
15
	
16 16
	/* Initialize the dragonfly boards, the xbee, encoders, lineFollowing */
17 17
	dragonfly_init(ALL_ON);
18 18
	xbee_init();
19 19
	encoders_init();
20
//	lineDrive_init();
20
	lineDrive_init();
21 21
	rtc_init(SIXTEENTH_SECOND, NULL);	
22 22
	wl_basic_init_default();
23 23
	wl_set_channel(13);
......
26 26
	sign = 0;
27 27
	
28 28
	//Test code
29
	state = SROAD;
29
	state = SHIGHWAY;
30 30

  
31 31
	sendBuffer[1] = id;
32 32

  
......
208 208
			}
209 209
			break;
210 210
		case SHIGHWAY:/*On highway*/
211
//			sign = lineFollow();
212
			//highway behaviors
213
				//merging
214
				//passing
215
			//read barcode
211
			driveHighway();
216 212
			break;
217 213
		default:
218 214
			usb_puts("I got stuck in an unknown state! My state is ");

Also available in: Unified diff