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

Files at this revision

API Documentation at this revision

Comitter:
josepesado
Date:
Sat Oct 18 13:01:47 2014 +0000
Parent:
2:c878e4203b62
Child:
4:0c97edd98157
Commit message:
Master Vechicle with RF communications

Changed in this revision

XBEE.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/XBEE.lib	Sat Oct 18 13:01:47 2014 +0000
@@ -0,0 +1,1 @@
+XBEE#a2bdcc45d1dc
--- 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);