春ロボ1班(元F3RC4班+) / Mbed 2 deprecated harurobo_main_ver4

Dependencies:   mbed EC PathFollowing-ver10 CruizCore_R1370P

Revision:
2:e04e6b5d6584
Parent:
1:86eae1cf26d2
Child:
3:e696a6dd4254
diff -r 86eae1cf26d2 -r e04e6b5d6584 main.cpp
--- a/main.cpp	Fri Nov 16 23:32:58 2018 +0000
+++ b/main.cpp	Sat Nov 17 05:35:23 2018 +0000
@@ -103,7 +103,7 @@
 //X=円弧の中心座標、Y=円弧の中心座標、r=円弧の半径、theta=plotの間隔(0~90°)、v=目標速度
 
     int s;
-    int t = 0;
+    int t = 4;
     double plotx[(90/theta)+1];  //円弧にとるplotのx座標
     double ploty[(90/theta)+1];
     //double plotvx[(90/theta)+1];  //各plotにおける速度
@@ -142,15 +142,15 @@
                 //CalMotorOut(plotvx[t], plotvy[t],0);
 
                 //printf("t=%d x_out=%f y_out=%f\n\r",t,x_out,y_out);
-                //printf("t=%d (0)=%f (1)=%f (2)=%f (3)=%f\n\r",t,GetMotorOut(0),GetMotorOut(1),GetMotorOut(2),GetMotorOut(3));
+                printf("t=%d (0)=%f (1)=%f (2)=%f (3)=%f\n\r",t,GetMotorOut(0),GetMotorOut(1),GetMotorOut(2),GetMotorOut(3));
 
                 output(GetMotorOut(0),GetMotorOut(1),GetMotorOut(2),GetMotorOut(3));  //m1~m4に代入
 
                 if(((X - now_x)*(plotx[t+1] - plotx[t]) + (Y - now_y)*(ploty[t+1] - ploty[t])) < 0)t++;
                 if(t == (90/theta))break;
-                
+
                 MotorControl(m1,m2,m3,m4);  //出力
-                
+
                 //printf("m1=%d m2=%d m3=%d m4=%d x=%f y=%f\n\r",m1,m2,m3,m4,now_x,now_y);
 
             }
@@ -202,13 +202,15 @@
 
     //m1, m2, m3, m4 に出力を代入すればとりあえず動く
 
-    while(1) {
+    purecurve(1,0,0,1000,9,1000);
+
+    /*while(1) {
 
-        //Debug_Control();
-        purecurve(1,0,0,1000,9,1000);
-        //MotorControl(m1,m2,m3,m4);
+                //Debug_Control();
 
-    }
+                //MotorControl(m1,m2,m3,m4);
+
+      }*/
 }
 
 void UserLoopSetting()