2015_robocon_bteam / Mbed 2 deprecated 2015robot_main

Dependencies:   PID QEI mbed

Fork of 2015robot_main by Naoto Deguchi

Revision:
95:deb2e75c42ff
Parent:
93:9cacc1763463
Child:
98:ffe1247b9784
--- a/Swing.h	Fri Oct 16 06:25:58 2015 +0000
+++ b/Swing.h	Fri Oct 16 06:53:36 2015 +0000
@@ -32,7 +32,8 @@
         enableShoot=0;
         if(swingRadVelocity > 1.0){
 //            waitTime = (float)(((2.0 * PI) / swingRadVelocity) / 2.0);
-            waitTime = (float)((((10.0 * PI) / 4.0) / swingRadVelocity) / 8.0);
+//            waitTime = (float)((((10.0 * PI) / 4.0) / swingRadVelocity) / 8.0);
+            waitTime = (float)(((2.0 * PI) / swingRadVelocity) / 4.0)-0.0017;
             wait(waitTime);
         }
         sendData(1,6);
@@ -42,7 +43,7 @@
 double swingSita=0.0;
 inline void mesureSwing() {
     PulsesSwing       = ( double )SwingSens.getPulses();
-    swingRadVelocity  = (((PulsesSwing - PrefPulsesSwing) / 3450.0) * 2 * PI) / RATE;
+    swingRadVelocity  = (((PulsesSwing - PrefPulsesSwing) / 3000.0) * 2 * PI) / RATE;
     PrefPulsesSwing   = PulsesSwing;
 }