ROBOSTEP_5期 / Mbed 2 deprecated George_Master_Param

Dependencies:   mbed robot

Revision:
54:f54d26e8d8ac
Parent:
49:6337717484fe
--- a/main.cpp	Mon May 20 00:54:03 2019 +0000
+++ b/main.cpp	Mon May 20 11:39:41 2019 +0000
@@ -77,10 +77,11 @@
     if(RightOrLeft == 0) {
         if(start_state == 0) theta0 = -degree/100.0;
         else if(start_state == 1) {
-            theta0 = -degree/100.0 + 90;
+            theta0 = -degree/100.0 - 90;
             motor_lo.setDutyLimit(0.6);//0.5
             motor_li.setDutyLimit(0.6);
-            turn(35.0);
+            wait(0.5);
+            turn(55.0);
         } else if(start_state == 2) {
             theta0 = -degree/100.0 - 135;
             motor_lo.setDutyLimit(0.6);//0.5
@@ -91,11 +92,11 @@
     } else {
         if(start_state == 0) theta0 = -degree/100.0;
         else if(start_state == 1) {
-            theta0 = -degree/100.0 - 45;
+            theta0 = -degree/100.0 + 90;
             //段差前旋回
             motor_lo.setDutyLimit(0.6);//0.5
             motor_li.setDutyLimit(0.6);
-            turn(-35.0);
+            turn(-55.0);
         } else if(start_state == 2) {
             theta0 = -degree/100.0 + 135;
             motor_lo.setDutyLimit(0.6);//0.5
@@ -211,7 +212,8 @@
             motor_li.setDutyLimit(params[13].duty);
             while(switch_modes[2].read() == 0) {
                 //straightAndInfinity(params[13].argument[0], params[13].argument[1]);
-                straight();
+                //straight();
+                ropeAndInfinity(params[13].argument[0], params[13].argument[1]);
             }
             printf("uhai stand by ok!!!!!!!!!!\r\n");
             NoHandSignal();