From: Lauren Meier Date: Fri, 12 Feb 2016 04:38:09 +0000 (-0800) Subject: remove unnecessary code that double checks speed input & add javadoc style comment... X-Git-Url: http://challenge-bot.com/repos/?p=3501%2Fstronghold-2016;a=commitdiff_plain;h=5a3fcb1cc9f5b9ea83a7b758cd11b3907026d0e4 remove unnecessary code that double checks speed input & add javadoc style comment to setWinchSpeed --- diff --git a/src/org/usfirst/frc/team3501/robot/commands/SetWinchSpeed.java b/src/org/usfirst/frc/team3501/robot/commands/SetWinchSpeed.java index c66e4000..be0ea219 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/SetWinchSpeed.java +++ b/src/org/usfirst/frc/team3501/robot/commands/SetWinchSpeed.java @@ -4,16 +4,24 @@ import org.usfirst.frc.team3501.robot.Robot; import edu.wpi.first.wpilibj.command.Command; +/*** + * This command will set the winch motor to a specified speed. + * + * pre-condition: This command must be run by a button in OI with method + * whileHeld() + * + * post-condition: winch motor set to a specified speed. + * + * @author Meryem and Avi + * + */ + public class SetWinchSpeed extends Command { double winchUpSpeed; public SetWinchSpeed(double speed) { requires(Robot.scaler); winchUpSpeed = speed; - if (winchUpSpeed > 1) - winchUpSpeed = 1; - if (winchUpSpeed < -1) - winchUpSpeed = -1; } @Override