projects
/
3501
/
2017steamworks
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
competition fixes
[3501/2017steamworks]
/
src
/
org
/
usfirst
/
frc
/
team3501
/
robot
/
subsystems
/
Shooter.java
diff --git
a/src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java
b/src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java
index bf743b1a3195139d8ec59c73f4d5f713087458e3..ab36fddee10a8be135c5589ef4c1a8b5baa8d0e2 100644
(file)
--- a/
src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java
+++ b/
src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java
@@
-19,7
+19,8
@@
public class Shooter extends Subsystem {
private static final double RPM_THRESHOLD = 10;
private static final double DEFAULT_INDEXING_MOTOR_VALUE = 0.75;
private static final double RPM_THRESHOLD = 10;
private static final double DEFAULT_INDEXING_MOTOR_VALUE = 0.75;
- private static final double DEFAULT_SHOOTING_SPEED = 2800; // rpm
+ private static final double REVERSE_FLYWHEEL_MOTOR_VALUE = -0.75;
+ private static final double DEFAULT_SHOOTING_SPEED = 2700; // rpm
private static final double SHOOTING_SPEED_INCREMENT = 50;
private double targetShootingSpeed = DEFAULT_SHOOTING_SPEED;
private static final double SHOOTING_SPEED_INCREMENT = 50;
private double targetShootingSpeed = DEFAULT_SHOOTING_SPEED;
@@
-52,7
+53,7
@@
public class Shooter extends Subsystem {
* motor value from -1 to 1(fastest forward)
*/
public void setFlyWheelMotorVal(double val) {
* motor value from -1 to 1(fastest forward)
*/
public void setFlyWheelMotorVal(double val) {
- val = MathLib.restrictToRange(val,
0
.0, 1.0);
+ val = MathLib.restrictToRange(val,
-1
.0, 1.0);
flyWheel1.set(val);
flyWheel2.set(val);
}
flyWheel1.set(val);
flyWheel2.set(val);
}
@@
-140,4
+141,8
@@
public class Shooter extends Subsystem {
this.wheelController.setSetPoint(this.targetShootingSpeed);
this.currentShooterMotorValue = 0;
}
this.wheelController.setSetPoint(this.targetShootingSpeed);
this.currentShooterMotorValue = 0;
}
+
+ public void reverseFlyWheel() {
+ this.setFlyWheelMotorVal(shooter.REVERSE_FLYWHEEL_MOTOR_VALUE);
+ }
}
}