Project

General

Profile

Revision 1005

test takes an argument for the USB port #, but it doesn't commit a
memory error like it did last time I committed

View differences:

trunk/code/projects/mapping/server/test.c
40 40
    
41 41
    char c;
42 42
    int robot = atoi(argv[1]);
43
	char *port;	/* port that XBee is on */
43
	char port[14];	/* port that XBee is on */
44 44

  
45
	/* decide which USB port to use based on the second cmd-line argument */
45
	/* USB port to use is second cmd-line argument */
46 46
	strcpy(port, "/dev/ttyUSB");
47
	port = strcat(port, argv[2]);
47
	strcat(port, argv[2]);
48 48

  
49 49
    printf("Beginning: robot=%d\r\n", robot);
50 50
    wl_init();

Also available in: Unified diff