2015/06/09

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

Fork of Aigamozu_Robot_ver4_4 by aigamozu

Revision:
38:01505448b500
Parent:
37:26374d6066cb
Child:
39:f6c7b746f0c4
--- a/main.cpp	Sat May 30 14:46:59 2015 +0000
+++ b/main.cpp	Fri Jun 05 03:47:37 2015 +0000
@@ -64,7 +64,9 @@
 //Base    ID: 'a' ~ 'a'
 //manager ID: '0'(数字のゼロ)
 //
-const char MyID = 'A';
+const char MyID = 'C'; 
+
+const int collect_base_address[4]={0,1,2,3};//{4,5,6,7}
 //************ID Number*****************
 
 /////////////////////////////////////////
@@ -331,8 +333,8 @@
 
 void auto_Move(){
  
- bool result; // 毎回の内外判定の結果を格納
- bool out_flag = false; // 外側処理の実行フラグ
+ bool result=false; // 毎回の内外判定の結果を格納
+ static bool out_flag = false; // 外側処理の実行フラグ
  const int sequenceTime[4] = {30000, 31000, 34000, 34200};
  const int outSequenceTime[4] = {10000, 11000, 14000, 14200};
  
@@ -543,7 +545,7 @@
         if( collect_Timer.read_ms() >= collect_Time){
             collect_Timer.reset();   
                      
-            Send_Request_Base(collect_flag);
+            Send_Request_Base(collect_base_address[collect_flag]);
             
             collect_flag++;