Index: trunk/code/lib/src/libwireless/wl_token_ring.c
===================================================================
--- trunk/code/lib/src/libwireless/wl_token_ring.c	(revision 85)
+++ trunk/code/lib/src/libwireless/wl_token_ring.c	(revision 86)
@@ -9,7 +9,9 @@
 #include <queue.h>
 
 #ifdef ROBOT
+#ifndef FIREFLY
 #include <bom.h>
+#endif
 #include <time.h>
 #endif
 
@@ -73,17 +75,24 @@
 //current robot to check in the iterator
 int iteratorCount = 0;
 
+void do_nothing(void) {}
+int get_nothing(void) {return -1;}
+
 #ifdef ROBOT
+#ifndef FIREFLY
 void (*bom_on_function) (void) = bom_on;
 void (*bom_off_function) (void) = bom_off;
 int (*get_max_bom_function) (void) = get_max_bom;
 #else
-void do_nothing(void) {}
-int get_nothing(void) {return -1;}
 void (*bom_on_function) (void) = do_nothing;
 void (*bom_off_function) (void) = do_nothing;
 int (*get_max_bom_function) (void) = get_nothing;
 #endif
+#else
+void (*bom_on_function) (void) = do_nothing;
+void (*bom_off_function) (void) = do_nothing;
+int (*get_max_bom_function) (void) = get_nothing;
+#endif
 
 PacketGroupHandler wl_token_ring_handler =
 		{WL_TOKEN_RING_GROUP, wl_token_ring_timeout_handler,
@@ -736,7 +745,7 @@
  **/
 void wl_token_iterator_begin(void)
 {
-	int i;
+	int i = 0;
 	iteratorCount = 0;
 	while (!sensor_matrix_get_in_ring(sensorMatrix, i) &&
 			i < sensor_matrix_get_size(sensorMatrix))
Index: trunk/code/lib/src/libwireless/xbee.c
===================================================================
--- trunk/code/lib/src/libwireless/xbee.c	(revision 85)
+++ trunk/code/lib/src/libwireless/xbee.c	(revision 86)
@@ -92,11 +92,19 @@
  * Interrupt for the robot. Adds bytes received from the xbee
  * to the queue.
  **/
+#ifndef FIREFLY
 ISR(USART1_RX_vect)
 {
 	char c = UDR1;
 	queue_add(xbee_queue, (void*)(int)c);
 }
+#else
+SIGNAL(SIG_USART0_RECV)
+{
+	char c = UDR0;
+	queue_add(xbee_queue, (void*)(int)c);
+}
+#endif
 
 #else
 
@@ -129,7 +137,11 @@
 	#ifdef ROBOT
 
 	//enable the receiving interrupt
+	#ifdef FIREFLY
+	UCSR0B |= _BV(RXCIE) | _BV(RXEN);
+	#else
 	UCSR1B |= _BV(RXCIE);
+	#endif
 	sei();
 	#else
 	xbee_stream = open("/dev/ttyUSB0", O_RDWR);
Index: trunk/code/lib/src/libwireless/wireless.c
===================================================================
--- trunk/code/lib/src/libwireless/wireless.c	(revision 85)
+++ trunk/code/lib/src/libwireless/wireless.c	(revision 86)
@@ -10,8 +10,10 @@
 #include <signal.h>
 #else
 #include <time.h>
+#ifndef FIREFLY
 #include <bom.h>
 #endif
+#endif
 
 /*Function Prototypes*/
 
@@ -65,7 +67,11 @@
 	
 	//begin timeout timer
 	#ifdef ROBOT
+	#ifdef FIREFLY
+	rtc_init(PRESCALE_DIV_128, 32, &wl_do_timeout);
+	#else
 	rtc_init(HALF_SECOND, &wl_do_timeout); 
+	#endif
 	#else
 	//create a timer to trigger every half second
 	struct sigevent evp;
Index: trunk/code/lib/bin/libwireless.a
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: trunk/code/projects/libwireless/lib/wl_token_ring.c
===================================================================
--- trunk/code/projects/libwireless/lib/wl_token_ring.c	(revision 85)
+++ trunk/code/projects/libwireless/lib/wl_token_ring.c	(revision 86)
@@ -9,7 +9,9 @@
 #include <queue.h>
 
 #ifdef ROBOT
+#ifndef FIREFLY
 #include <bom.h>
+#endif
 #include <time.h>
 #endif
 
@@ -73,17 +75,24 @@
 //current robot to check in the iterator
 int iteratorCount = 0;
 
+void do_nothing(void) {}
+int get_nothing(void) {return -1;}
+
 #ifdef ROBOT
+#ifndef FIREFLY
 void (*bom_on_function) (void) = bom_on;
 void (*bom_off_function) (void) = bom_off;
 int (*get_max_bom_function) (void) = get_max_bom;
 #else
-void do_nothing(void) {}
-int get_nothing(void) {return -1;}
 void (*bom_on_function) (void) = do_nothing;
 void (*bom_off_function) (void) = do_nothing;
 int (*get_max_bom_function) (void) = get_nothing;
 #endif
+#else
+void (*bom_on_function) (void) = do_nothing;
+void (*bom_off_function) (void) = do_nothing;
+int (*get_max_bom_function) (void) = get_nothing;
+#endif
 
 PacketGroupHandler wl_token_ring_handler =
 		{WL_TOKEN_RING_GROUP, wl_token_ring_timeout_handler,
@@ -736,7 +745,7 @@
  **/
 void wl_token_iterator_begin(void)
 {
-	int i;
+	int i = 0;
 	iteratorCount = 0;
 	while (!sensor_matrix_get_in_ring(sensorMatrix, i) &&
 			i < sensor_matrix_get_size(sensorMatrix))
Index: trunk/code/projects/libwireless/lib/xbee.c
===================================================================
--- trunk/code/projects/libwireless/lib/xbee.c	(revision 85)
+++ trunk/code/projects/libwireless/lib/xbee.c	(revision 86)
@@ -92,11 +92,19 @@
  * Interrupt for the robot. Adds bytes received from the xbee
  * to the queue.
  **/
+#ifndef FIREFLY
 ISR(USART1_RX_vect)
 {
 	char c = UDR1;
 	queue_add(xbee_queue, (void*)(int)c);
 }
+#else
+SIGNAL(SIG_USART0_RECV)
+{
+	char c = UDR0;
+	queue_add(xbee_queue, (void*)(int)c);
+}
+#endif
 
 #else
 
@@ -129,7 +137,11 @@
 	#ifdef ROBOT
 
 	//enable the receiving interrupt
+	#ifdef FIREFLY
+	UCSR0B |= _BV(RXCIE) | _BV(RXEN);
+	#else
 	UCSR1B |= _BV(RXCIE);
+	#endif
 	sei();
 	#else
 	xbee_stream = open("/dev/ttyUSB0", O_RDWR);
Index: trunk/code/projects/libwireless/lib/wireless.c
===================================================================
--- trunk/code/projects/libwireless/lib/wireless.c	(revision 85)
+++ trunk/code/projects/libwireless/lib/wireless.c	(revision 86)
@@ -10,8 +10,10 @@
 #include <signal.h>
 #else
 #include <time.h>
+#ifndef FIREFLY
 #include <bom.h>
 #endif
+#endif
 
 /*Function Prototypes*/
 
@@ -65,7 +67,11 @@
 	
 	//begin timeout timer
 	#ifdef ROBOT
+	#ifdef FIREFLY
+	rtc_init(PRESCALE_DIV_128, 32, &wl_do_timeout);
+	#else
 	rtc_init(HALF_SECOND, &wl_do_timeout); 
+	#endif
 	#else
 	//create a timer to trigger every half second
 	struct sigevent evp;
