Revision 1900 trunk/code/projects/traffic_navigation/highways.c

View differences:

highways.c
34 34
	case 0: // Normal Drive
35 35
		{
36 36
		int theCode = doDrive(205);
37
/*		if(theCode != NORMAL && theCode >= 0)
37
		if(theCode != NORMAL && theCode >= 0)
38 38
			return theCode;
39
*/
40
			int range = range_read_distance(IR2);
39
		int range = range_read_distance(IR3);
41 40
	        usb_puti(range);
42 41
       		usb_puts(" : ");
43 42
	        usb_puti(averagei);
44 43
	        usb_puts("\r\n");
45 44
		orb1_set_color(CYAN);
46 45
       		if(range == -1){
47
                	range = 200;
46
                	range = PASS_DISTANCE+50;
48 47
	        }
49 48
        	counti ++;
50 49
	        averagei += range;
......
57 56
		break;
58 57
		}
59 58
	case 1:
60
			//merge(ILEFT);
61 59
			states = 2;
62 60
			canMerge = 0;
63 61
	case 2:

Also available in: Unified diff