2015/05/11

Dependencies:   ADXL345 AigamozuControlPackets HMC5843 ITG3200 MBed_Adafruit-GPS-Library XBee agzIDLIST agz_common mbed

Fork of aigamozu_auto_for_robot_ver1 by aigamozu

Revision:
1:004530c56f4b
Parent:
0:567aa3346701
Child:
2:2afe6fd6e565
--- a/main.cpp	Mon Apr 27 12:08:38 2015 +0000
+++ b/main.cpp	Mon Apr 27 13:25:26 2015 +0000
@@ -132,7 +132,8 @@
     int collect_flag = 0;
     char collect_state = 'a';
     XBeeAddress64 collect_Address[4] = {XBeeAddress64(BASE1_32H,BASE1_32L), XBeeAddress64(BASE2_32H,BASE2_32L), 
-                                        XBeeAddress64(BASE3_32H,BASE3_32L), XBeeAddress64(BASE4_32H,BASE4_32L)};
+                                        XBeeAddress64(BASE3_32H,BASE3_32L), XBeeAddress64(BASE4_32H,BASE4_32L),
+                                        XBeeAddress64(BASE5_32H,BASE5_32L)};
     XBeeAddress64 robot_Address = XBeeAddress64(ROBOT1_32H, ROBOT1_32L);
     int id,SenderIDc;
     bool flag = true;
@@ -202,6 +203,8 @@
                                 
                             }else{
                                 
+                                printf("%d: catch request\n", id);
+                                
                                 //send normal data
                                 //Create GPS Infomation Packet
                                 agz.createReceiveStatusCommand(MyID,SenderIDc,myGPS.longitudeH,myGPS.longitudeL,myGPS.latitudeH,myGPS.latitudeL);
@@ -224,7 +227,7 @@
                     case RECEIVE_STATUS:{
                             
                         //printf("Receive Status\n");      
-                           
+    
                         id = buf1[5] - 'A';
                         robot[id].set_state(buf1[9]);
                         robot[id].set_LatitudeH(&buf1[13]);