add pcon f and b

Dependencies:   mbed HCSR04

Revision:
6:07534de7cdb4
Parent:
5:a7c3f446a1f1
Child:
7:df29c4de6522
--- a/main.cpp	Sun Dec 19 17:12:27 2021 +0000
+++ b/main.cpp	Sun Dec 19 17:23:45 2021 +0000
@@ -199,7 +199,7 @@
                     
                 }
             }else if(state_1 == 1){//前進→壁検出フェーズ
-                if(dist1 < 50 && dist1 >= 30){
+                if(dist1 < 50 && dist1 >= 35){
                     state_1 = 2;
                 }else{
                     set_ACC(ACC_B);//加速度設定
@@ -210,6 +210,7 @@
             }else if(state_1 == 2){//帰還フェーズ
                 if(ActPos > -10000){
                     vel_stop();
+                    state_1 = 0;
                     wait(3.0);
                     break;
                 }else{