Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: Swing.h
- Revision:
- 7:4aa57a35ec0b
- Parent:
- 0:b613dc16f27d
- Child:
- 22:4127fcf8c7d7
- Child:
- 24:6d2573d6f2b6
--- a/Swing.h Sun Nov 01 02:31:30 2015 +0000
+++ b/Swing.h Sun Nov 01 09:50:46 2015 +0000
@@ -32,19 +32,12 @@
contSwing.setBias(0.0);
contSwing.setMode(AUTO_MODE);
}
-float waitTime = 0.0;
+
void countSwing() {
Indicator1 = !Indicator1;
if(enableShoot){
enableShoot=0;
-// waitTime = (float)(((2.0 * PI) / swingRadVelocity) / 2.0);
-// waitTime = (float)((((10.0 * PI) / 4.0) / swingRadVelocity) / 8.0);
- if(swingRadVelocity==0.0) waitTime = (float)((((2.0 * PI) / swingRadVelocity) / 4.0));//-0.0017);
- else waitTime=0.0;
- if(waitTime<0.0) waitTime=0.0;
- if(waitTime>10.0) waitTime=10.0;
- wait(waitTime);
- sendData(1,6);
+ sendData(2,15);
}
}