CanSat-C 2021 / Mbed 2 deprecated CanSat-C

Dependencies:   mbed HMC6352 US015 TB6612FNG2 getGPS ATP3011

Revision:
5:56eddb7b4a9e
Parent:
3:74d0faefdd78
Child:
6:1cda8471adc3
diff -r 7e0bc5d811a5 -r 56eddb7b4a9e main.cpp
--- a/main.cpp	Sun Oct 24 06:19:26 2021 +0000
+++ b/main.cpp	Sun Oct 24 06:38:24 2021 +0000
@@ -28,16 +28,13 @@
     catchGPS();
     AngleGet();
     回転();
-    while(i >= 5)   // 5°ずれると方向転換する
-    {
-        
-        
-    }
+
     motor(1)
     while (True) {
         if (FrontGet()) {
             MotorDriver(1, 0);      //停止()
-            Avoid();
+            MotorDriver(4, 0.5);    //回転
+            continue;
         }
         else {
             移動();
@@ -46,6 +43,6 @@
         if ((next_CP_x - GPS_x)*(next_CP_x - GPS_x) + (next_CP_y = GPS_y)*(next_CP_y = GPS_y) < 5) {    //試験で調整
         break;
         }
-        }
+    }
         // 行動フロー終了
-    }
+}