Change SetMotorValue
[3501/2017steamworks] / src / org / usfirst / frc / team3501 / robot / commands / climber / RunWinchContinuous.java
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 Robot.getClimber().setMotorValues(motorVal);
24
25 }
26
27 @Override
28 protected void execute() {
29
30 }
31
32 @Override
33 protected boolean isFinished() {
34 return false;
35 }
36
37 @Override
38 protected void end() {
39 Robot.getClimber().stop();
40 }
41
42 @Override
43 protected void interrupted() {
44 end();
45 }
46 }