competition fixes
[3501/2017steamworks] / src / org / usfirst / frc / team3501 / robot / subsystems / Shooter.java
index 6397292049a78637fe675af773033a382d605268..ab36fddee10a8be135c5589ef4c1a8b5baa8d0e2 100644 (file)
@@ -18,9 +18,10 @@ public class Shooter extends Subsystem {
   private PIDController wheelController;
 
   private static final double RPM_THRESHOLD = 10;
-  private static final double DEFAULT_INDEXING_MOTOR_VALUE = -0.75;
+  private static final double DEFAULT_INDEXING_MOTOR_VALUE = 0.75;
+  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 = 25;
+  private static final double SHOOTING_SPEED_INCREMENT = 50;
 
   private double targetShootingSpeed = DEFAULT_SHOOTING_SPEED;
   private double currentShooterMotorValue = 0;
@@ -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);
+  }
 }