2015_robocon_bteam / Mbed 2 deprecated 2015robot_main_zenkoku

Dependencies:   PID QEI mbed

Revision:
40:aed70f4dcd06
Parent:
39:5ba406327aa3
Child:
41:cd916d59832d
--- a/main_ps3.cpp	Mon Nov 16 10:54:45 2015 +0000
+++ b/main_ps3.cpp	Tue Nov 17 07:50:45 2015 +0000
@@ -78,11 +78,11 @@
                 if(!skip) sendData(1,1);
                 CStep=1; 
             }
-            if((x>6100.0)&&(CStep==1)) {
+            if((x>6070.0)&&(CStep==1)) {
                 if(!skip) sendData(1,2);
                 CStep=2;
             }
-            if((x>7750.0)&&(CStep==2)) {
+            if((x>7720.0)&&(CStep==2)) {
                 if(!skip) sendData(1,3);
                 CStep=3;
             }
@@ -109,11 +109,11 @@
                 if(!skip) sendData(1,6); //front
                 CStep=6;
             }
-            if((x<6700.0)&&(CStep==6)) {
+            if((x<6670.0)&&(CStep==6)) {
                 if(!skip) sendData(1,5); //middle
                 CStep=7;
             }
-            if((x<5500.0)&&(CStep==7)) {
+            if((x<5470.0)&&(CStep==7)) {
                 if(!skip) sendData(1,4); //over
                 CStep=8;
             }
@@ -342,12 +342,12 @@
             manualIM920();     /*IM920 button*/
 #ifdef BLUE
             /********************************Swing Mode(middle)*********************************/
-            if((mstep==0)&&((10000.0>x)&&(x>1550.0))) {
+            if((mstep==0)&&((10000.0>x)&&(x>1350.0))) {
                 dpcount=speed;
                 mstep=1;
             }
             if((mstep==1)&&((velocity<5.0)&&(velocity>-5.0))){
-                targ_sita=PI/4.0;
+                targ_sita=PI/4.0+PI/30.0;
                 swingmoved=2;
                 mstep=251;
             }
@@ -452,7 +452,7 @@
                 mstep=1;
             }
             if((mstep==1)&&((velocity<5.0)&&(velocity>-5.0))){
-                targ_sita=-PI/4.0;
+                targ_sita=-PI/8.0-PI/30.0+PI/40.0;
                 swingmoved=2;
                 mstep=251;
             }