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:
- 7:662171c0e984
- Parent:
- 6:4d96c8776442
- Child:
- 9:1190db2717a8
--- a/com.cpp Tue Apr 22 06:39:37 2014 +0000 +++ b/com.cpp Tue Apr 22 07:09:06 2014 +0000 @@ -102,13 +102,14 @@ void com::ackCheck() { + __disable_irq(); if( !txBuffer->isEmpty() && xbeeTx.writeable()) { short * pkt = txBuffer->pop(); write(pkt[0],pkt[1]); //may need to disable interrupt delete[] pkt; } - + __enable_irq(); } bool com::rdy2ack()