Edit javadoc comments
[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 * This command runs the winch motor continuously at a specified speed until the
9 * button triggering it is released. This command also makes the drive train
10 * motors run because the winch is controlled by the drive train.
11 *
12 * pre-condition: This command must be run by a button in OI. The robot must be
13 * attached to the rope.
14 *
15 * post-condition: Winch motor set to a specified speed.
16 *
17 * @author shivanighanta
18 *
19 */
20 public class RunWinchContinuous extends Command {
21 private double motorVal;
22
23 /**
24 * See JavaDoc comment in class for details
25 *
26 * @param motorVal
27 * value range is from -1 to 1
28 */
29 public RunWinchContinuous(double motorVal) {
30 requires(Robot.getDriveTrain());
31 this.motorVal = motorVal;
32 }
33
34 @Override
35 protected void initialize() {
36 Robot.getDriveTrain().setMotorValues(motorVal, motorVal);
37
38 }
39
40 @Override
41 protected void execute() {
42
43 }
44
45 @Override
46 protected boolean isFinished() {
47 return false;
48 }
49
50 @Override
51 protected void end() {
52
53 }
54
55 @Override
56 protected void interrupted() {
57 end();
58 }
59 }