Index: trunk/code/projects/mapping/robot/robot_main.c
===================================================================
--- trunk/code/projects/mapping/robot/robot_main.c	(revision 964)
+++ trunk/code/projects/mapping/robot/robot_main.c	(revision 965)
@@ -5,8 +5,7 @@
 
 #define POLLING_INTERVAL 50    //interval in ms to get sensor data
 #define MAP 1	// packet group for sending data points
-#define POINT_RAW 1 // packet type for map data points w/ raw encoder data
-#define POINT_ODO 2 // packet type for map data points w/ odometry data
+#define POINT_ODO 2
 
 #define WL_CNTL_GROUP 4
 
@@ -28,28 +27,17 @@
 void set_motion (void);
 
 PacketGroupHandler packetHandler = {WL_CNTL_GROUP, NULL, NULL, &packet_receive, NULL};
-PacketGroupHandler love_handle = {MAP, NULL, NULL, NULL, NULL};
 
 int main(void)
 {
     /* initialize components and join the token ring */
     dragonfly_init(ALL_ON);
-    //range_init();
-    //encoders_init();
     odometry_init();
+    orb_enable();
     wl_init();
     wl_set_channel(0xE);
-    wl_register_packet_group(&love_handle);
     wl_register_packet_group(&packetHandler);
-    orb_enable();
-    //data_response_init();
-    //wl_token_ring_register();
-    //wl_token_ring_join();
-    //run_around_init();
-
-    //usb_puti(xbee_get_address());
-    //return 0;
-
+    
     velocity = 190;
     state = CNTL_STOP;
 
@@ -62,34 +50,26 @@
     while(1)
     {
 	wl_do();
-	//run_around_FSM();	/* traverse the environment and avoid obstacles ... */
 	delay_ms(POLLING_INTERVAL);	/* until it's time to grab map data */
 	x = odometry_dx(); // use when sending odometry data
 	y = odometry_dy();
 	theta = odometry_angle();
-	//store[0] = encoder_get_dx(LEFT);    // left encoder distance
-	//store[1] = encoder_get_dx(RIGHT);   // right encoder distance
 	store[0] = x;
-    store[1] = y;
-    *((double*)(store + 2)) = theta;
-    store[4] = range_read_distance(IR1);	// IR1 range
+	store[1] = y;
+	*((double*)(store + 2)) = theta;
+	store[4] = range_read_distance(IR1);	// IR1 range
 	store[5] = range_read_distance(IR2);	// IR2 range
 	store[6] = range_read_distance(IR3);	// IR3 range
 	store[7] = range_read_distance(IR4);	// IR4 range
 	store[8] = range_read_distance(IR5);	// IR5 range
-    sprintf( buf, "%d %d %f %d %d %d %d %d\n", store[0], store[1],
-          *((double *)(store+2)), store[4], store[5], store[6],
-          store[7], store[8] );
-    usb_puts(buf);
+	sprintf( buf, "%d %d %f %d %d %d %d %d\n", store[0], store[1],
+	    *((double *)(store+2)), store[4], store[5], store[6],
+	    store[7], store[8] );
+	usb_puts(buf);
 
 	send = (char*) store;
 
-	// send point w/ raw encoder data
-	// wl_send_global_packet(MAP, POINT_RAW, send, 14, 0);
-
-	// send point w/ odometry data
 	wl_send_global_packet(MAP, POINT_ODO, send, 18, 0);
-	
     }
 
     wl_terminate();
Index: trunk/code/projects/mapping/server/test.c
===================================================================
--- trunk/code/projects/mapping/server/test.c	(revision 964)
+++ trunk/code/projects/mapping/server/test.c	(revision 965)
@@ -24,7 +24,7 @@
 void packet_receive(char type, int source, unsigned char* packet, int length);
 
 PacketGroupHandler cntlHandler = {WL_CNTL_GROUP, NULL, NULL, NULL, NULL};
-PacketGroupHandler receiveHandler = {1, NULL, NULL, &packet_receive, NULL};
+PacketGroupHandler receiveHandler = {MAP, NULL, NULL, &packet_receive, NULL};
 
 FILE *file;
 int parent_running = 1;
@@ -108,42 +108,24 @@
 void send_packet (char type, int dst_robot) {
     wl_send_robot_to_robot_global_packet(WL_CNTL_GROUP, type,
             NULL, 0, dst_robot, 0);
-    //wl_send_global_packet(WL_CNTL_GROUP, type, NULL, 0, 0);
 }
 
 void packet_receive (char type, int source, unsigned char* packet, int length) {
-    if (type == POINT_RAW) {
-        //expected input: enc_l enc_r IR1 IR2 IR3 IR4 IR5
-        int i, temp;
-        for (i = 0; i < length; i += 2) {
-            temp = (char)packet[i+1] << 8;
-            temp |= (char)packet[i];
-            fprintf(file, "%d ", temp);
-        }
-        fprintf(file, "\n");
-    }
-    //else if (type == POINT_ODO) {
-        //printf("received packet!\r\n");
-        // expected input: x y theta(double) IR1 IR2 IR3 IR4 IR5
-        short x,y,ir1,ir2,ir3,ir4,ir5;
-        //int theta_temp;
-        x = ((short)packet[1] << 8) | (short)packet[0];
-        y = ((short)packet[3] << 8) | (short)packet[2];
-        ir1 = ((short)packet[9] << 8) | (short)packet[8];
-        ir2 = ((short)packet[11] << 8) | (short)packet[10];
-        ir3 = ((short)packet[13] << 8) | (short)packet[12];
-        ir4 = ((short)packet[15] << 8) | (short)packet[14];
-        ir5 = ((short)packet[17] << 8) | (short)packet[16];
+    short x,y,ir1,ir2,ir3,ir4,ir5;
 
-        char tarr[] = {packet[4],packet[5],packet[6],packet[7]};
-        float *theta_ptr = (float *)tarr;
-        float theta = *theta_ptr;
+    /* convert received data from 2 chars to 1 short */
+    x = ((short)packet[1] << 8) | (short)packet[0];
+    y = ((short)packet[3] << 8) | (short)packet[2];
+    ir1 = ((short)packet[9] << 8) | (short)packet[8];
+    ir2 = ((short)packet[11] << 8) | (short)packet[10];
+    ir3 = ((short)packet[13] << 8) | (short)packet[12];
+    ir4 = ((short)packet[15] << 8) | (short)packet[14];
+    ir5 = ((short)packet[17] << 8) | (short)packet[16];
 
-        //fprintf(file, "theta = %f\n", theta);
-        fprintf(file, "%d %d %f %d %d %d %d %d\n", x, y, theta,
-                ir1, ir2, ir3, ir4, ir5);
-        //printf("%d %d %f %d %d %d %d %d\n", x, y, theta,
-        //        ir1, ir2, ir3, ir4, ir5);
-        //fflush(stdout);
-    //}
+    char tarr[] = {packet[4],packet[5],packet[6],packet[7]};
+    float *theta_ptr = (float *)tarr;
+    float theta = *theta_ptr;
+
+    fprintf(file, "%d %d %f %d %d %d %d %d\n", x, y, theta,
+	    ir1, ir2, ir3, ir4, ir5);
 }
