Commit | Line | Data |
---|---|---|
9738295a SG |
1 | package org.usfirst.frc.team3501.robot.commands.climber; |
2 | ||
a04ce2ff SG |
3 | import org.usfirst.frc.team3501.robot.Robot; |
4 | ||
9738295a SG |
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 | this.motorVal = motorVal; | |
18 | } | |
19 | ||
20 | @Override | |
21 | protected void initialize() { | |
5be898b7 | 22 | Robot.getClimber().setMotorValue(motorVal); |
cf086549 | 23 | |
9738295a SG |
24 | } |
25 | ||
26 | @Override | |
27 | protected void execute() { | |
28 | ||
29 | } | |
30 | ||
31 | @Override | |
32 | protected boolean isFinished() { | |
33 | return false; | |
34 | } | |
35 | ||
36 | @Override | |
37 | protected void end() { | |
a04ce2ff | 38 | Robot.getClimber().stop(); |
9738295a SG |
39 | } |
40 | ||
41 | @Override | |
42 | protected void interrupted() { | |
a04ce2ff | 43 | end(); |
9738295a SG |
44 | } |
45 | } |