aa

Dependencies:   mbed TrapezoidControl QEI

Revision:
46:4a8bca4cc1fd
Parent:
45:878f8f385635
Child:
47:b6e5a6bfe7ab
--- a/System/Process/Process.cpp	Thu Oct 03 11:09:31 2019 +0000
+++ b/System/Process/Process.cpp	Sat Oct 05 08:11:29 2019 +0000
@@ -290,7 +290,7 @@
             slow=20;
             cross=0;//十字数える用
             cros=0;
-            count=100000;//wait代替え
+            count=0;//wait代替え
             UP_flag = false;
             SW_flag = false;
             Air_flag = false;
@@ -338,9 +338,12 @@
             start_flag = false;
             lock = false;
             if(ZoneSW) {
+                count=0;
                 mode=1;
                 current = 6;
+                
             } else {
+                count=0;
                 mode=1;
                 current = 4;
             }
@@ -364,7 +367,7 @@
         }
         if(zyouge) {
             if(Twsh==1) {
-                motor[MOTOR_0].pwm = 200;
+                motor[MOTOR_0].pwm = 215;
                 motor[MOTOR_0].dir = FOR;
                 if(UPLS) {
                     motor[MOTOR_0].pwm = 100;
@@ -373,7 +376,7 @@
                 }
             }
             if(Twsh==2) {
-                motor[MOTOR_0].pwm = 235;
+                motor[MOTOR_0].pwm = 245;
                 motor[MOTOR_0].dir = FOR;
                 if(UPLS2) {
                     motor[MOTOR_0].pwm = 100;
@@ -1303,7 +1306,7 @@
         motor[TIRE_BR].dir = FOR;
         motor[TIRE_BL].pwm = 27;
         motor[TIRE_BL].dir = BACK;
-        if(g[2]==0) {
+        if(g[2]==0&&count>=100000) {
             count=100000;
             cross=0;
             mode=3;
@@ -2160,7 +2163,7 @@
         motor[TIRE_BR].dir = BACK;
         motor[TIRE_BL].pwm = normal;
         motor[TIRE_BL].dir = FOR;
-        if(g[2]==0) {
+        if(g[2]==0&&count>=100000) {
             count=100000;
             cross=0;
             mode=3;