2015_robocon_bteam / Mbed 2 deprecated 2015robot_main

Dependencies:   PID QEI mbed

Fork of 2015robot_main by Naoto Deguchi

Revision:
79:7f86e18f40ef
Parent:
66:14df82661dfa
Child:
83:e1638c58e1f1
--- a/Swing.h	Sat Oct 10 09:53:52 2015 +0000
+++ b/Swing.h	Sun Oct 11 07:34:51 2015 +0000
@@ -9,7 +9,7 @@
     Motor_swing.period_us(SWING_PERIOD);
     //controller set
     contSwing.setInputLimits(0.0, 100.0);
-    contSwing.setOutputLimits(0.0, 1.0);
+    contSwing.setOutputLimits(0.0, 0.6);
     contSwing.setBias(0.0);
     contSwing.setMode(AUTO_MODE);
 }
@@ -19,8 +19,8 @@
     if(enableShoot){
         enableShoot=0;
         if(swingRadVelocity > 1.0){
-            //waitTime = (float)(((2.0 * PI) / swingRadVelocity) / 2.0);
-            waitTime = (float)((((9.0 * PI) / 4.0) / swingRadVelocity) / 2.0);
+//            waitTime = (float)(((2.0 * PI) / swingRadVelocity) / 2.0);
+            waitTime = (float)((((9.0 * PI) / 4.0) / swingRadVelocity) / 4.0);
             wait(waitTime);
         }
         sendData(1,6);