robot

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

Files at this revision

API Documentation at this revision

Comitter:
m5171135
Date:
Wed Jun 18 13:50:11 2014 +0000
Parent:
7:bfc65eac624e
Child:
9:357fa70be9c7
Commit message:
akm

Changed in this revision

AigamozuControlPackets.lib Show annotated file Show diff for this revision Revisions of this file
MBed_Adafruit-GPS-Library.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
--- a/AigamozuControlPackets.lib	Mon Jun 09 00:16:45 2014 +0000
+++ b/AigamozuControlPackets.lib	Wed Jun 18 13:50:11 2014 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/teams/aigamozu/code/AigamozuControlPackets/#f164a716be46
+http://mbed.org/teams/aigamozu/code/AigamozuControlPackets/#200ce5c1f486
--- a/MBed_Adafruit-GPS-Library.lib	Mon Jun 09 00:16:45 2014 +0000
+++ b/MBed_Adafruit-GPS-Library.lib	Wed Jun 18 13:50:11 2014 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mlee350/code/MBed_Adafruit-GPS-Library/#ff72e93bcb0e
+http://mbed.org/users/mlee350/code/MBed_Adafruit-GPS-Library/#8203e954d8e1
--- a/main.cpp	Mon Jun 09 00:16:45 2014 +0000
+++ b/main.cpp	Wed Jun 18 13:50:11 2014 +0000
@@ -3,9 +3,9 @@
 //    
 //
 //  Program name: Aigamozu Robot Control
-//  author: Atsunori Maruyama
-//  ver ->  1.3
-//  day ->  2014/06/09
+//  Author: Atsunori Maruyama
+//  Ver ->  1.3
+//  Day ->  2014/06/09
 //  
 //
 /**********************************************/
@@ -104,7 +104,7 @@
                     //CommandType -> Send Status
                     case STATUS_REQUEST:{
                             //Create GPS Infomation Packet
-                            agz.createReceiveStatusCommand('B','a',myGPS.longitudeH,myGPS.longitudeL,myGPS.latitudeH,myGPS.latitudeL);
+                            agz.createReceiveStatusCommand('C','a',myGPS.longitudeH,myGPS.longitudeL,myGPS.latitudeH,myGPS.latitudeL);
                             //Select Destination
                             ZBTxRequest tx64request(remoteAddress,agz.packetData,agz.getPacketLength());
                             //Send -> Base
@@ -132,8 +132,14 @@
         
         if (refresh_Timer.read_ms() >= refresh_Time) {
             refresh_Timer.reset();
-            if (myGPS.fix) agz.nowStatus = GPS_AVAIL;
+            if (myGPS.fix) {
+                agz.nowStatus = GPS_AVAIL;
+                agz.reNewPoint(myGPS.longitudeH,myGPS.longitudeL,myGPS.latitudeH,myGPS.latitudeL);
+            }
             else agz.nowStatus = GPS_UNAVAIL;
+            
+            
+            
         }     
     }
 }
\ No newline at end of file