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
Diff: com.cpp
- Revision:
- 14:d2acb373d81c
- Parent:
- 13:2fb7b19dcd70
- Child:
- 15:3f742edaa359
diff -r 2fb7b19dcd70 -r d2acb373d81c com.cpp --- a/com.cpp Thu May 22 05:58:40 2014 +0000 +++ b/com.cpp Sun May 25 22:54:45 2014 +0000 @@ -99,7 +99,7 @@ /* */ /*************************************************************************/ -void com::ackCheck() +void com::sendACK() { if( !txBuffer->isEmpty()) { @@ -107,12 +107,13 @@ short * pkt = txBuffer->pop(); __enable_irq(); write(pkt[0],pkt[1]); //may need to disable interrupt - #ifdef DEBUG_COM +// #ifdef DEBUG_COM if(pkt[1] % 5 == 0) { PRINTLNF("len: %d",txBuffer->queueLength()); + xbeeTx.printf("len: %d\n\r",txBuffer->queueLength()); } - #endif +// #endif delete[] pkt; }