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.
Fork of 2015robot_main by
Diff: Swing.h
- Revision:
- 83:e1638c58e1f1
- Parent:
- 79:7f86e18f40ef
- Child:
- 84:919a335ac81e
diff -r 7e24b99b9b61 -r e1638c58e1f1 Swing.h
--- a/Swing.h Sun Oct 11 07:42:18 2015 +0000
+++ b/Swing.h Mon Oct 12 06:15:45 2015 +0000
@@ -2,14 +2,14 @@
#define SWING_H
/***Swing.***/
-PID contSwing(5.917 ,2145.0 ,0.0 ,RATE);
+PID contSwing(15.917 ,2.0 ,0.0 ,RATE);
inline void initializeSwing() {
interrupter.rise(&countSwing);
Motor_swing.period_us(SWING_PERIOD);
//controller set
contSwing.setInputLimits(0.0, 100.0);
- contSwing.setOutputLimits(0.0, 0.6);
+ contSwing.setOutputLimits(0.0, 1.0);
contSwing.setBias(0.0);
contSwing.setMode(AUTO_MODE);
}
@@ -20,7 +20,7 @@
enableShoot=0;
if(swingRadVelocity > 1.0){
// waitTime = (float)(((2.0 * PI) / swingRadVelocity) / 2.0);
- waitTime = (float)((((9.0 * PI) / 4.0) / swingRadVelocity) / 4.0);
+ waitTime = (float)((((10.0 * PI) / 4.0) / swingRadVelocity) / 8.0);
wait(waitTime);
}
sendData(1,6);

