Set Button Value
[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 this.motorVal = motorVal;
18 }
19
20 @Override
21 protected void initialize() {
22 Robot.getClimber().setMotorValue(motorVal);
23
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() {
38 Robot.getClimber().stop();
39 }
40
41 @Override
42 protected void interrupted() {
43 end();
44 }
45 }