robot
Dependencies: ADXL345 AigamozuControlPackets HMC5843 ITG3200 MBed_Adafruit-GPS-Library XBee agzIDLIST mbed agz_common
Diff: main.cpp
- Revision:
- 8:760cb743e4fc
- Parent:
- 7:bfc65eac624e
- Child:
- 9:357fa70be9c7
--- 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