master

Dependencies:   arrc_mbed

Revision:
1:9f57d402ea10
Parent:
0:55f25431e6d1
Child:
2:2feb9be14c08
--- a/main.cpp	Tue Apr 12 10:32:57 2022 +0000
+++ b/main.cpp	Tue Apr 12 10:42:14 2022 +0000
@@ -33,6 +33,13 @@
 bool limit_switch = true;
 int step=0;
 int auto_mode=0;
+int side_change=0;
+
+
+
+
+
+
 
 int direct_xx=0;
 int direct_yy=0;
@@ -77,7 +84,7 @@
 }
 
 bool pro2(){  //アングルとスピードを同時に決める 下から3桁で角度を決める(0~360) それ以外でスピードを決める これなに?私もわからん
-    double anglert=-135.000000000;
+    double anglert=-135.000000000+180.0*side_change;
     Led4.write(1);
     for(int i=0;i<4;i++){
     target[i]=(direct_yy*sin(M_PI/180.0*(90*i - gyro.yaw - anglert))-direct_xx*cos(M_PI/180.0*(90*i - gyro.yaw - anglert))+direct_turn)*30.0;
@@ -201,7 +208,7 @@
     slave.addCMD(32,abc12);
     slave.addCMD(33,abc13);
     slave.addCMD(34,abc14);
-    int side_change=0;
+    side_change=0;
     
     goal_x=goal_x_right;
     goal_y=goal_y_right;