Revision 1889

View differences:

trunk/code/projects/traffic_navigation/highways.h
1 1
#ifndef HIGHWAYS_H
2 2
#define HIGHWAYS_H
3 3

  
4
void driveHighway(void);
4
void highwayFSM(void);
5 5

  
6 6

  
7
#define COUNT_MAX 8
7
#define COUNT_MAX 12
8 8
#define PASS_DISTANCE 150
9 9
#endif
trunk/code/projects/traffic_navigation/highways.c
11 11
	
12 12
	case 0: // Normal Drive
13 13
		doDrive(225);
14
		int range = range_read_distance(IR2);
14
		int range = range_read_distance(IR3);
15 15
	        usb_puti(range);
16 16
       		usb_puts(" : ");
17 17
	        usb_puti(averagei);
......
20 20
       		if(range == -1){
21 21
                	return;
22 22
	        }
23

  
24 23
        	counti ++;
25 24
	        averagei += range;
26 25
		if(counti>= COUNT_MAX){
trunk/code/projects/traffic_navigation/main.c
94 94
				//passing
95 95
			//read barcode
96 96
			break;
97
			break;
97 98
		default:
98 99
			usb_puts("I got stuck in an unknown state! My state is ");
99 100
			usb_puti(state);

Also available in: Unified diff