xbee communication for UWB quadcopter project Originally by Greg Abdo Forking to reduce impact of interrupt by moving packetbuilder out of the interrupt and letting be handled in the main loop

Fork of com by Prosper Van

Revision:
6:4d96c8776442
Parent:
5:7cdf299ea7a4
Child:
7:662171c0e984
--- a/com.cpp	Tue Apr 22 06:28:49 2014 +0000
+++ b/com.cpp	Tue Apr 22 06:39:37 2014 +0000
@@ -193,10 +193,10 @@
         rxBuffer->add( array );   // Add to read buffer.
 //        xbeeTx.putc( 255 );
 //        xbeeTx.putc( 255 );
-        if ( commandData[0] != 0 )
+        if ( commandData[0] != 0)
         {
             short * ackPacket = new short[2];
-            ackPacket[1] = commandData[0];
+            ackPacket[0] = commandData[0];
             ackPacket[1] = commandData[4];
             txBuffer->add( ackPacket ); // Ack the packet with sequence nuber.
         }