Project

General

Profile

Revision 1976

Added function that creates the edges used for mapping in mapping.c. Note: code does not yet compile.

View differences:

trunk/code/projects/traffic_navigation/mapping.h
31 31
/* This array holds all of the intersections that are represented in the graph
32 32
 * after its creation, the graph is transmitted wirelessly */
33 33
node[NUM_FEATURES] intersections; 
34

  
35
int createEdge(edge* newEdge);
trunk/code/projects/traffic_navigation/mapping.c
12 12
 * Returns 0 if all of the intersections in the database were seen
13 13
 * 1 otherwise 
14 14
 */
15
int createEdge(edge* newEdge){
16
	char barcode;
17
	char time;
18
	rtc_init(SIXTEENTH_SECOND, NULL);
19
	rtc_reset();
20
	while(barcode = NOBARCODE){
21
		barcode = (char) doDrive(200);
22
	}
23
	time = rtc_get();
24
	newEdge.to = barcode;
25
	newEdge.dist = time;
26
	return 0;
27
}
28

  
15 29
int createMap(){
16 30

  
17 31
    int seenout_count = 0;			/* The number of intersections we have completely seen */

Also available in: Unified diff