xbee communication for UWB quadcopter project
Diff: com.cpp
- Revision:
- 5:4d96c8776442
- Parent:
- 4:7cdf299ea7a4
- Child:
- 6: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. }