2015_robocon_bteam / Mbed 2 deprecated 2015robot_main

Dependencies:   PID QEI mbed

Fork of 2015robot_main by Naoto Deguchi

Revision:
60:4a75f3f3a934
Parent:
57:3fbd487e055e
Child:
62:02a44f5bc51e
--- a/manualMode.h	Thu Oct 01 09:52:36 2015 +0000
+++ b/manualMode.h	Fri Oct 02 07:24:52 2015 +0000
@@ -36,7 +36,12 @@
         }
     }
     else if(b==6){
-        targSwingRadVelocity = swingspeed;
+//        targSwingRadVelocity = swingspeed;
+        for(float i=0.0;i<1.0;i+=0.01){
+            Motor_swing=i;
+            wait(0.05);
+        }
+        Motor_swing = 1.0;
     }
     else if(b==5){
         if(edge5){
@@ -95,7 +100,12 @@
         }
     }
     else if(triangle){
-        targSwingRadVelocity = swingspeed;
+//        targSwingRadVelocity = swingspeed;
+        for(float i=0.0;i<1.0;i+=0.01){
+            Motor_swing=i;
+            wait(0.05);
+        }
+        Motor_swing = 1.0;
     }
     else if(square){
         if(edge_square){
@@ -104,8 +114,9 @@
         }
     }
     else if(cross){
-        targSwingRadVelocity = 0.0;
-        contSwing.reset();
+//        targSwingRadVelocity = 0.0;
+//        contSwing.reset();
+        Motor_swing=0.0;
     }
     else if(l1){
         sendData(1,5);