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 will run the winch motor continuously until the button
9 * triggering it is released. This command also makes the drive train motors run
10 * 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 * @param motorVal
18 * value range is from -1 to 1
19 *
20 * @author shivanighanta
21 *
22 */
23 public class RunWinchContinuous extends Command {
24 private double motorVal;
25
26 /**
27 * See JavaDoc comment in class for details
28 *
29 * @param motorVal
30 * value range is from -1 to 1
31 */
32 public RunWinchContinuous(double motorVal) {
33 requires(Robot.getDriveTrain());
34 this.motorVal = motorVal;
35 }
36
37 @Override
38 protected void initialize() {
39 Robot.getDriveTrain().setMotorValues(motorVal, motorVal);
40
41 }
42
43 @Override
44 protected void execute() {
45
46 }
47
48 @Override
49 protected boolean isFinished() {
50 return false;
51 }
52
53 @Override
54 protected void end() {
55
56 }
57
58 @Override
59 protected void interrupted() {
60 end();
61 }
62 }