X-Git-Url: http://challenge-bot.com/repos/?a=blobdiff_plain;f=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2Fsubsystems%2FShooter.java;h=ab36fddee10a8be135c5589ef4c1a8b5baa8d0e2;hb=9ca89e45fa84b2ec93bc6adf60c7dde1e0a7defb;hp=bf743b1a3195139d8ec59c73f4d5f713087458e3;hpb=f56e6ebf87134eccc3b8bb0e1d2529bd6cb061dd;p=3501%2F2017steamworks diff --git a/src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java b/src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java index bf743b1..ab36fdd 100644 --- 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 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; @@ -52,7 +53,7 @@ public class Shooter extends Subsystem { * 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); } @@ -140,4 +141,8 @@ public class Shooter extends Subsystem { this.wheelController.setSetPoint(this.targetShootingSpeed); this.currentShooterMotorValue = 0; } + + public void reverseFlyWheel() { + this.setFlyWheelMotorVal(shooter.REVERSE_FLYWHEEL_MOTOR_VALUE); + } }