xbee communication for UWB quadcopter project

Dependencies:   PwmIn

Files at this revision

API Documentation at this revision

Comitter:
oprospero
Date:
Fri Apr 25 06:21:19 2014 +0000
Parent:
10:ec36e1b59a39
Commit message:
small updates;

Changed in this revision

com.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r ec36e1b59a39 -r d1f488302d06 com.cpp
--- 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()