Index: wireless.c
===================================================================
--- wireless.c	(revision 792)
+++ wireless.c	(revision 793)
@@ -44,13 +44,7 @@
 	#include <signal.h>
 #else
 	#include <time.h>
-	#ifndef FIREFLY
-		#ifdef BAYBOARD
-			#include <lbom.h>
-		#else
-			#include <bom.h>
-		#endif
-	#endif
+	#include <bom.h>
 #endif
 
 /*Function Prototypes*/
@@ -64,6 +58,8 @@
 /*Data Members*/
 
 //used to store incoming and outgoing packets
+//TODO: does this need to be 128?  can it be smaller to save memory?
+//TODO: this shouldn't be hardcoded as 128.  it should be a define.
 static unsigned char wl_buf[128];
 //1 if we have timed out since we last checked, 0 otherwise.
 static int wl_timeout = 0;
@@ -106,6 +102,7 @@
 int wl_init()
 {
 	int i;
+  //TODO: using memset here instead of this loop, *might* be less instructions and *might* reduce code size but not sure
 	for (i = 0; i < WL_MAX_PACKET_GROUPS; i++)
 		wl_packet_groups[i] = NULL;
 
@@ -174,6 +171,8 @@
  *
  * @see wl_get_pan
  **/
+//TODO: this function is so simple, it *may* be beneficial to inline this function.  testing of if
+// it reduces code size or not should be done to be sure.
 int wl_set_pan(int pan)
 {
 	return xbee_set_pan_id(pan);
@@ -186,6 +185,8 @@
  *
  * @see wl_set_pan
  **/
+//TODO: this function is so simple, it *may* be beneficial to inline this function.  testing of if
+// it reduces code size or not should be done to be sure.
 int wl_get_pan(void)
 {
 	return xbee_get_pan_id();
@@ -198,6 +199,8 @@
  *
  * @see wl_get_channel
  **/
+//TODO: this function is so simple, it *may* be beneficial to inline this function.  testing of if
+// it reduces code size or not should be done to be sure.
 int wl_set_channel(int channel)
 {
 	return xbee_set_channel(channel);
@@ -210,6 +213,8 @@
  *
  * @see wl_set_channel
  **/
+//TODO: this function is so simple, it *may* be beneficial to inline this function.  testing of if
+// it reduces code size or not should be done to be sure.
 int wl_get_channel(void)
 {
 	return xbee_get_channel();
@@ -220,6 +225,8 @@
  *
  * @return the 16-bit address of the XBee module.
  **/
+//TODO: this function is so simple, it *may* be beneficial to inline this function.  testing of if
+// it reduces code size or not should be done to be sure.
 int wl_get_xbee_id()
 {
 	return xbee_get_address();
@@ -235,6 +242,8 @@
  * @param dest the 16-bit address of the XBee to send the packet to
  * @param frame the frame number to see with a TX_STATUS response
  **/
+//TODO: this function is so simple, it *may* be beneficial to inline this function.  testing of if
+// it reduces code size or not should be done to be sure.
 int wl_send_robot_to_robot_global_packet(char group, char type, char* data, int len, int dest, char frame)
 {
 	return wl_send_packet(group, type, data, len, dest, XBEE_OPTIONS_BROADCAST_ALL_PANS, frame);
@@ -250,6 +259,8 @@
  * @param dest the 16-bit address of the XBee to send the packet to
  * @param frame the frame number to see with a TX_STATUS response
  **/
+//TODO: this function is so simple, it *may* be beneficial to inline this function.  testing of if
+// it reduces code size or not should be done to be sure.
 int wl_send_robot_to_robot_packet(char group, char type, char* data, int len, int dest, char frame)
 {
 	return wl_send_packet(group, type, data, len, dest, XBEE_OPTIONS_NONE, frame);
@@ -264,6 +275,8 @@
  * @param len the packet length in bytes
  * @param frame the frame number to see with a TX_STATUS response
  **/
+//TODO: this function is so simple, it *may* be beneficial to inline this function.  testing of if
+// it reduces code size or not should be done to be sure.
 int wl_send_global_packet(char group, char type, char* data, int len, char frame)
 {
 	return wl_send_packet(group, type, data, len, XBEE_BROADCAST, XBEE_OPTIONS_BROADCAST_ALL_PANS, frame);
@@ -278,6 +291,8 @@
  * @param len the packet length in bytes
  * @param frame the frame number to see with a TX_STATUS response
  **/
+//TODO: this function is so simple, it *may* be beneficial to inline this function.  testing of if
+// it reduces code size or not should be done to be sure.
 void wl_send_pan_packet(char group, char type, char* data, int len, char frame)
 {
 	wl_send_packet(group, type, data, len, XBEE_BROADCAST,
@@ -297,6 +312,8 @@
  **/
 int wl_send_packet(char group, char type, char* data, int len, int dest, char options, char frame)
 {
+  //TODO: does this need to be 128?  can it be smaller to save memory?
+  //TODO: this shouldn't be hardcoded as 128.  it should be a define.
 	char buf[128];
 	int i;
 	if (frame != 0)
@@ -374,7 +391,7 @@
 	}
 
 	int len = xbee_get_packet(wl_buf);
-	if (len == -1)
+	if (len < 0)//no packet received
 		return;
 
 	if (wl_buf[0] == XBEE_TX_STATUS)
@@ -411,6 +428,7 @@
 	}
 	else if (wl_buf[0] == XBEE_RX)
 	{
+    //TODO: what does this 7 represent?  It shouldn't be hardcoded.  It should be set as a define
 		if (len < 7)
 		{
 			WL_DEBUG_PRINT("Packet is too small.\r\n");
@@ -426,6 +444,7 @@
 		int options = wl_buf[4];
 		*/
 
+    //TODO: these indices, etc should be defined, not hardcoded
 		int group = wl_buf[5];
 		int type = wl_buf[6];
 		int packetLen = len - 7;
@@ -442,6 +461,8 @@
 
 
 #ifndef ROBOT
+//TODO: this function is so simple, it *may* be beneficial to inline this function.  testing of if
+// it reduces code size or not should be done to be sure.
 void wl_set_com_port(char* port)
 {
 	xbee_set_com_port(port);
