| 1 | package org.usfirst.frc.team3501.robot.commands.climber; |
| 2 | |
| 3 | import org.usfirst.frc.team3501.robot.Robot; |
| 4 | |
| 5 | import edu.wpi.first.wpilibj.command.Command; |
| 6 | |
| 7 | /** |
| 8 | * Runs the winch continuously at a given motor value |
| 9 | * |
| 10 | * @author shivanighanta |
| 11 | * |
| 12 | */ |
| 13 | public class RunWinchContinuous extends Command { |
| 14 | private double motorVal; |
| 15 | |
| 16 | public RunWinchContinuous(double motorVal) { |
| 17 | requires(Robot.getClimber()); |
| 18 | this.motorVal = motorVal; |
| 19 | } |
| 20 | |
| 21 | @Override |
| 22 | protected void initialize() { |
| 23 | } |
| 24 | |
| 25 | @Override |
| 26 | protected void execute() { |
| 27 | |
| 28 | } |
| 29 | |
| 30 | @Override |
| 31 | protected boolean isFinished() { |
| 32 | return false; |
| 33 | } |
| 34 | |
| 35 | @Override |
| 36 | protected void end() { |
| 37 | Robot.getClimber().stop(); |
| 38 | } |
| 39 | |
| 40 | @Override |
| 41 | protected void interrupted() { |
| 42 | end(); |
| 43 | } |
| 44 | } |