2015_robocon_bteam / Mbed 2 deprecated 2015robot_main

Dependencies:   PID QEI mbed

Fork of 2015robot_main by Naoto Deguchi

Revision:
112:717acc7c99f9
Parent:
111:846ea36dc1dc
Child:
114:325e4c158141
--- a/main_ps3.cpp	Tue Oct 20 09:05:43 2015 +0000
+++ b/main_ps3.cpp	Wed Oct 21 08:15:06 2015 +0000
@@ -195,12 +195,13 @@
             }
             
 //            if((x>1200.0+deff)&&(CStep==15)){
-            if((x>1000.0+deff)&&(CStep==15)){
+//            if((x>1000.0+deff)&&(CStep==15)){
+            if((x>1050.0+deff)&&(CStep==15)){
                 sendData(1,5);
                 CStep=16;
             }
-//            if((x>2655.0+deff)&&(CStep==16)){
-            if((x>2455.0+deff)&&(CStep==16)){
+            if((x>2505.0+deff)&&(CStep==16)){
+//            if((x>2455.0+deff)&&(CStep==16)){
 //            if((x>2630.0)&&(CStep==16)){
                 sendData(1,4);
                 CStep=17;
@@ -260,11 +261,13 @@
                 step=114;
             }
             /***Cylinder***/
-            if((x>3030.0+deff)&&(CStep==1)) { 
+//            if((x>3030.0+deff)&&(CStep==1)) { 
+            if((x>3100.0+deff)&&(CStep==1)) { 
                 if(!skip) sendData(1,1);
                 CStep=2; 
             }
-            if((x>5940.0+deff)&&(CStep==2)) {
+//            if((x>5940.0+deff)&&(CStep==2)) {
+            if((x>6000.0+deff)&&(CStep==2)) {
                 if(!skip) sendData(1,2);
                 CStep=3;
             }
@@ -324,10 +327,12 @@
             /////////////////////////////////////////////////////////////////////////
             /*****************************Opponents Mode****************************/
             if((step==15)&&((5700.0>x)&&(x>50.0))) {
-                targ_sita=-0.025;
+                targ_sita=-0.035;
+//                targ_sita=-0.055;
                 step=16;
             }
-            if((step==16)&&(x>2800.0+deff)){
+//            if((step==16)&&(x>2800.0+deff)){
+            if((step==16)&&(x>2850.0+deff)){
                 targ_velocity=0.0;
                 step=17;
             }
@@ -343,17 +348,21 @@
                 step=114;
             }
             
-            if((x>1450.0+deff)&&(CStep==15)){
+            if((x>1350.0+deff)&&(CStep==15)){
+//            if((x>1440.0+deff)&&(CStep==15)){
                 sendData(1,4);
                 CStep=16;
             }
-            if((x>2850.0+deff)&&(CStep==16)){
+//            if((x>2750.0+deff)&&(CStep==16)){
+            if((x>2650.0+deff)&&(CStep==16)){
+//            if((x>2850.0+deff)&&(CStep==16)){
                 sendData(1,5);
                 CStep=17;
             }
             if((x<2400.0+deff)&&(CStep==17)){
                 sendData(7,0);
                 CStep=114;
+                
             }
             /////////////////////////////////////////////////////////////////////////
             /*****************************Disturb Mode****************************/