This is the source code used by master vehicle. Modules: CAMCTL SRVCTL MTRCTL still missing i2c readings from accelerometer and rf communication

Dependencies:   CAMCTL MTRCTL SRVCTL mbed FXOS8700CQ XBEE

Revision:
3:7bdacc4cf273
Parent:
2:c878e4203b62
--- a/main.cpp	Fri Oct 17 22:44:17 2014 +0000
+++ b/main.cpp	Sat Oct 18 13:01:47 2014 +0000
@@ -20,6 +20,8 @@
   * - Included Rx and Tx Buffer in order to allow MSGHDL integration.
   * Rev 0.1.1 14/10/2014
   * - Corrected placing o data into Tx buffer
+  * Rev 0.2 18/10/2014
+  * - Added XBee services.
   */ 
   
 /**
@@ -28,6 +30,7 @@
 #include "camctl.h"         /* Camera controller */
 #include "srvctl.h"         /* Servo controller */
 #include "mtrctl.h"         /* Motor controller */
+#include "xbee.h"           /* XBee controller */
 #include "FXOS8700CQ.h"     /* Accelerometer controller */
 
 /**
@@ -73,6 +76,7 @@
     CAMCTL_vInit();
     MTRCTL_vInit();
     SRVCTL_vInit();
+    XBee_vInit();
     IMU.enable();
     MAIN__xLEDIllumination.period_us(8333);
     xComPort1.baud(115200);
@@ -145,6 +149,12 @@
         {
             xComPort1.printf("ACCEL: Data invalid\r\n");
         }
+        
+        memcpy(CommandTx,au8TxBuffer,9);
+        XBee_u8TxRq = 1;
+        
+        XBee_vMain();
+        
         /* Pin alive indicator */
         MAIN__xPinAlive = !MAIN__xPinAlive;
         wait(0.0001);