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

View differences:

main.c
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
/*
33 33
	doDrive(255);
34 34
	turn(DOUBLE, ILEFT);
35 35
	
36 36
	while(1)
37 37
		doDrive(255);
38 38
	
39
	
39
*/	
40 40
	while (1) {
41 41
		/*DTM Finite State Machine*/
42 42
		switch(state){
......
88 88
			}
89 89
			break;
90 90
		case SHIGHWAY:/*On highway*/
91
		//	usb_puts("HIGHWAY\r\n");
92
			if(button1_click()) highwayStart();
93
			highwayFSM();
91 94
//			sign = lineFollow();
92 95
			//highway behaviors
93 96
				//merging
94 97
				//passing
95 98
			//read barcode
96 99
			break;
97
			break;
98 100
		default:
99 101
			usb_puts("I got stuck in an unknown state! My state is ");
100 102
			usb_puti(state);
......
249 251
			*/
250 252
		}
251 253
	}
252
}
254
}

Also available in: Unified diff