From: Shaina Chen Date: Fri, 5 Feb 2016 03:09:22 +0000 (-0800) Subject: remove content of changeSpeed and call setSpeed(newSpeed) X-Git-Url: http://challenge-bot.com/repos/?p=3501%2Fstronghold-2016;a=commitdiff_plain;h=64055177ef39e87231d59cb427b157fa97bb03da remove content of changeSpeed and call setSpeed(newSpeed) --- diff --git a/src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java b/src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java index cbf6df66..34875256 100755 --- a/src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java +++ b/src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java @@ -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