remove content of changeSpeed and call setSpeed(newSpeed)
authorShaina Chen <shaina.sierra@gmail.com>
Fri, 5 Feb 2016 03:09:22 +0000 (19:09 -0800)
committerShaina Chen <shaina.sierra@gmail.com>
Fri, 5 Feb 2016 04:21:34 +0000 (20:21 -0800)
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