移動系の統合試験用プログラムです。

Dependencies:   mbed TB6612FNG HMC6352 getGPS

Files at this revision

API Documentation at this revision

Comitter:
ushiroji
Date:
Wed Oct 27 12:26:48 2021 +0000
Parent:
4:135619de1646
Commit message:
test

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 135619de1646 -r 9f9cf3912fda main.cpp
--- a/main.cpp	Mon Oct 25 11:21:06 2021 +0000
+++ b/main.cpp	Wed Oct 27 12:26:48 2021 +0000
@@ -12,12 +12,15 @@
     while (true) {
         direction = AngleGet();
         pc.printf("direction=%f", direction);
-        if(direction < 5 || direction > 355) {  //角度判定
-            Move('2', 1);
-        }
-        else {
-            Move('1', 0);
-            Move('4', 0.5);
+        while(1) {
+            if(direction < 5 || direction > 355) {  //角度判定
+                Move('2', 1);
+                break;
+            }
+            else {
+                Move('1', 0);
+                Move('4', 0.5);
+            }
         }
         
         if (FrontGet()) {   //障害物判定