2015_robocon_bteam / Mbed 2 deprecated 2015robot_main

Dependencies:   PID QEI mbed

Fork of 2015robot_main by Naoto Deguchi

Revision:
66:14df82661dfa
Parent:
62:02a44f5bc51e
Child:
79:7f86e18f40ef
--- a/Swing.h	Mon Oct 05 07:53:02 2015 +0000
+++ b/Swing.h	Wed Oct 07 09:01:34 2015 +0000
@@ -8,7 +8,7 @@
     interrupter.rise(&countSwing);
     Motor_swing.period_us(SWING_PERIOD);
     //controller set
-    contSwing.setInputLimits(0.0, 1.0);
+    contSwing.setInputLimits(0.0, 100.0);
     contSwing.setOutputLimits(0.0, 1.0);
     contSwing.setBias(0.0);
     contSwing.setMode(AUTO_MODE);
@@ -19,7 +19,8 @@
     if(enableShoot){
         enableShoot=0;
         if(swingRadVelocity > 1.0){
-            waitTime = (float)(((2 * PI) / swingRadVelocity) / 2.0);
+            //waitTime = (float)(((2.0 * PI) / swingRadVelocity) / 2.0);
+            waitTime = (float)((((9.0 * PI) / 4.0) / swingRadVelocity) / 2.0);
             wait(waitTime);
         }
         sendData(1,6);