xbee communication for UWB quadcopter project
Diff: com.cpp
- Revision:
- 11:d1f488302d06
- Parent:
- 10:ec36e1b59a39
--- a/com.cpp Fri Apr 25 06:14:36 2014 +0000 +++ b/com.cpp Fri Apr 25 06:21:19 2014 +0000 @@ -102,14 +102,14 @@ void com::ackCheck() { - __disable_irq(); if( !txBuffer->isEmpty() && xbeeTx.writeable()) { + __disable_irq(); short * pkt = txBuffer->pop(); write(pkt[0],pkt[1]); //may need to disable interrupt delete[] pkt; + __enable_irq(); } - __enable_irq(); } bool com::rdy2ack()