2015_robocon_bteam / Mbed 2 deprecated 2015robot_main_zenkoku

Dependencies:   PID QEI mbed

Revision:
25:e72246ed7ec7
Parent:
24:6d2573d6f2b6
--- a/autoMode.h	Sun Nov 08 04:26:26 2015 +0000
+++ b/autoMode.h	Sun Nov 08 05:10:15 2015 +0000
@@ -19,20 +19,17 @@
 
 /***IM920 correspondence***/
 void autoIM920() {
-    if(b==7){  /*mode change*/
-        if(edge7) {
-            Com.detach();
-            edge7=0;
-            autoflag=0;
-            Indicator4=0;
-            IndicatorAuto=1;
-            direction_controller.setTunings(12.0,9.0,0.0);
-            flaga=0;
-            Move_l(0.0);
-            Move_r(0.0);
-            wait(0.1);
-            mCom.attach(&mCall,RATE);
-        }
+    if(!modeflag){  /*mode change*/
+        Com.detach();
+        autoflag=0;
+        Indicator4=0;
+        IndicatorAuto=1;
+        direction_controller.setTunings(12.0,9.0,0.0);
+        flaga=0;
+        Move_l(0.0);
+        Move_r(0.0);
+        wait(0.1);
+        mCom.attach(&mCall,RATE);
     }
     else if((b==6)&&(!flaga)){ /*start*/
         if(edge6){