xbee communication for UWB quadcopter project

Dependencies:   PwmIn

Revision:
2:bd1621102cad
Parent:
1:4f53de75bc96
Child:
3:f8e953201251
--- a/com.h	Sat Feb 15 19:54:45 2014 +0000
+++ b/com.h	Sun Apr 20 02:27:39 2014 +0000
@@ -20,7 +20,7 @@
 #include "PwmIn.h"
 
 const int BAUDRATE      = 38400;
-const int BUFFERSIZE    = 12;
+const int BUFFERSIZE    = 18;
 
 class com
 {  
@@ -30,6 +30,7 @@
         bool isSignalGood();
         void write( short, short ); // Write to the port.
         short * read();             // Read from the queue.
+        void setAPImode(bool mode);
         
     private:         
         Serial xbeeTx;                // tx - DIN, rx - DOUT
@@ -37,6 +38,8 @@
         queue *rxBuffer;            // queue of commands ready to be read.
         PwmIn rssi;
           
+        bool api_mode;
+          
         void callback();            // Handle the interrupts.
         void packetBuilder();       // Called by callback to place commandes into the queue.