X-Git-Url: http://challenge-bot.com/repos/?p=3501%2F2017steamworks;a=blobdiff_plain;f=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2Fcommands%2Fclimber%2FMaintainClimbedPosition.java;h=88ca8e0904198a6a7f7eb4ca61bd81537ea6a56a;hp=1ddde5938a49dd207d58285841d2e3d39a252dfa;hb=8565f6157b0e34288532871e4123f03c15f2179a;hpb=b8791ca4cfd815fbd063523ac6edc452d4a17602 diff --git a/src/org/usfirst/frc/team3501/robot/commands/climber/MaintainClimbedPosition.java b/src/org/usfirst/frc/team3501/robot/commands/climber/MaintainClimbedPosition.java index 1ddde59..88ca8e0 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/climber/MaintainClimbedPosition.java +++ b/src/org/usfirst/frc/team3501/robot/commands/climber/MaintainClimbedPosition.java @@ -6,25 +6,23 @@ import org.usfirst.frc.team3501.robot.subsystems.DriveTrain; import edu.wpi.first.wpilibj.command.Command; /** - * This command runs the winch at a specified speed and time in seconds when the - * robot has completed the climb and when the button triggering it is pressed. - * This command also makes the drive train motors run because the winch is - * controlled by the drive train. + * This command runs the winch at a specified speed when the robot has completed + * the climb and when the button triggering it is pressed. This command also + * makes the drive train motors run because the winch is controlled by the drive + * train. * * pre-condition: This command is run by a button in OI. The robot must have * completed climbing. * - * post-condition: Winch motor set to a specified speed for a specified time. + * post-condition: Winch motor set to a specified speed. * * @param motorVal * value range is from -1 to 1 - * @param time - * in seconds + * * @author shivanighanta * */ public class MaintainClimbedPosition extends Command { - private double time; /** * See JavaDoc comment in class for details @@ -32,9 +30,8 @@ public class MaintainClimbedPosition extends Command { * @param time * time in seconds to run the winch */ - public MaintainClimbedPosition(double time) { + public MaintainClimbedPosition() { requires(Robot.getDriveTrain()); - this.time = time; } @Override @@ -50,7 +47,7 @@ public class MaintainClimbedPosition extends Command { @Override protected boolean isFinished() { - return timeSinceInitialized() >= time; + return false; } @Override