Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: ADXL345 AigamozuControlPackets_for_auto HMC5843 ITG3200 MBed_Adafruit-GPS-Library XBee agzIDLIST mbed
Fork of Aigamozu_Robot_ver4_for_forward by
Diff: main.cpp
- Revision:
- 23:c5071bf93db1
- Parent:
- 22:af860680417b
- Child:
- 24:698d4e920d33
--- a/main.cpp Sat May 16 18:09:08 2015 +0000
+++ b/main.cpp Sun May 17 01:07:40 2015 +0000
@@ -25,6 +25,10 @@
//プログラムcreateReceiveStatusCommand()にて
//Aigamozu_collect_dataにinかoutかを送るためにstate関連をいじったので必要に応じて直してください。
//
+//2015/05//17
+//Send_Status関数内を変更:基地局への送信データのみ現在のモードを入れるパケットの部分に内外判定の結果を入れるようにした
+//基地局以外には現在のモードを送信するようにしてある
+//要確認!!!!
/**********************************************/
#include "mbed.h"
@@ -111,19 +115,28 @@
XBeeAddress64 send_Address;
if(SenderIDc == '0'){
send_Address = manager_Address;
+ agz.createReceiveStatusCommand(MyID,SenderIDc, agz.nowMode,
+ agz.get_agzPoint_lati(),agz.get_agzPoint_longi(),
+ agz.get_agzPointKalman_lati(),agz.get_agzPointKalman_longi(),
+ agz.get_agzCov_lati(),agz.get_agzCov_longi());
}
if(SenderIDc >= 'A' && SenderIDc < 'Z'){
send_Address = robot_Address[SenderIDc - 'A'];
+ //Create GPS Infomation Packet
+ agz.createReceiveStatusCommand(MyID,SenderIDc, (int)agz.gpsAuto(),
+ agz.get_agzPoint_lati(),agz.get_agzPoint_longi(),
+ agz.get_agzPointKalman_lati(),agz.get_agzPointKalman_longi(),
+ agz.get_agzCov_lati(),agz.get_agzCov_longi());
}
if(SenderIDc >= 'a' && SenderIDc <= 'z'){
send_Address = base_Address[SenderIDc - 'a'];
+ agz.createReceiveStatusCommand(MyID,SenderIDc, agz.nowMode,
+ agz.get_agzPoint_lati(),agz.get_agzPoint_longi(),
+ agz.get_agzPointKalman_lati(),agz.get_agzPointKalman_longi(),
+ agz.get_agzCov_lati(),agz.get_agzCov_longi());
}
//send normal data
- //Create GPS Infomation Packet
- agz.createReceiveStatusCommand(MyID,SenderIDc, (int)agz.gpsAuto(),
- agz.get_agzPoint_lati(),agz.get_agzPoint_longi(),
- agz.get_agzPointKalman_lati(),agz.get_agzPointKalman_longi(),
- agz.get_agzCov_lati(),agz.get_agzCov_longi());
+
//debug***************************************************
printf("latitude:%f,longitude:%f\nlatitudeK:%f,longitudeK:%f\nCovlat:%f,Covlongi:%f\n",
