ROBOSTEP_5期 / Mbed 2 deprecated George_Master_Param

Dependencies:   mbed robot

Revision:
46:c58335028928
Parent:
45:6df20a8f4b21
--- a/moves/moves.cpp	Fri May 17 05:43:51 2019 +0000
+++ b/moves/moves.cpp	Fri May 17 06:07:59 2019 +0000
@@ -103,11 +103,12 @@
 void Run(WalkMode mode, int d_step_l, int is_not_wait_right = 0)
 {
     CanID id = NORMAL;
-    if(is_not_wait_right == 1)
-        id = UNSYNC;
-    can_send(mode, motor_lo.getDutyLimit());
+    if(is_not_wait_right == 1) {
+//        id = UNSYNC;
+    }
+    can_send(mode, motor_lo.getDutyLimit(), id);
     RunNotWaitRight(mode, d_step_l);
-    if(is_not_wait_right == 0){
+    if(is_not_wait_right == 0) {
         WaitAnotherLeg();
     }
 }
@@ -122,11 +123,11 @@
     }
     DEBUG("angle:%.3f backdist:%.2f\r\n", degree0, get_dist_back());
 }
-void straightAndInfinity(float target_degree, float tolerance_degree)
+void straightAndInfinity(float target_degree, float tolerance_degree, int is_not_wait_right)
 {
     if(target_degree - degree0 > tolerance_degree) curveLeft();
     else if(degree0 - target_degree > tolerance_degree) curveRight();
-    else straight();
+    else straight(is_not_wait_right);
 }
 void climbAndInfinity(float target_degree, float tolerance_degree)
 {
@@ -142,9 +143,9 @@
 {
     Run(STOP,0);
 }
-void straight()
+void straight(int is_not_wait_right)
 {
-    Run(FORWARD,1);
+    Run(FORWARD,1, is_not_wait_right);
 }
 void turnLeft()
 {