remove content of changeSpeed and call setSpeed(newSpeed)
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / subsystems / Shooter.java
index cbf6df66b7408e50802b37240811c49f1c246af9..348752566e3a616fc3d54c298297bab3d173aff7 100755 (executable)
@@ -34,6 +34,10 @@ public class Shooter extends Subsystem {
         Constants.Shooter.ENCODER_PORT_B, false, EncodingType.k4X);
   }
 
+  /***
+   * 
+   * @return current sensor position??
+   */
   public double getCurrentSetPoint() {
     return shooter.get();
   }
@@ -71,13 +75,7 @@ public class Shooter extends Subsystem {
 
   public void changeSpeed(double change) {
     double newSpeed = getCurrentSetPoint() + change;
-    if (newSpeed > 1.0)
-      shooter.set(1.0);
-    else if (newSpeed < -1.0)
-      shooter.set(-1.0);
-    else {
-      setSpeed(newSpeed);
-    }
+    setSpeed(newSpeed);
   }
 
   // Punch Commands