Edit javadoc comments
[3501/2017steamworks] / src / org / usfirst / frc / team3501 / robot / commands / climber / RunWinchContinuous.java
CommitLineData
9738295a
SG
1package org.usfirst.frc.team3501.robot.commands.climber;
2
a04ce2ff
SG
3import org.usfirst.frc.team3501.robot.Robot;
4
9738295a
SG
5import edu.wpi.first.wpilibj.command.Command;
6
7/**
de8c65d3 8 * This command will run the winch motor continuously until the button
c3e1f46b
SG
9 * triggering it is released. This command also makes the drive train motors run
10 * because the winch is controlled by the drive train.
e2e9a7a7
SG
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
9738295a
SG
19 *
20 * @author shivanighanta
21 *
22 */
23public class RunWinchContinuous extends Command {
24 private double motorVal;
25
ad877a7e 26 /**
411129cd
SG
27 * See JavaDoc comment in class for details
28 *
ad877a7e 29 * @param motorVal
411129cd 30 * value range is from -1 to 1
ad877a7e 31 */
9738295a 32 public RunWinchContinuous(double motorVal) {
411129cd 33 requires(Robot.getDriveTrain());
9738295a
SG
34 this.motorVal = motorVal;
35 }
36
37 @Override
38 protected void initialize() {
411129cd 39 Robot.getDriveTrain().setMotorValues(motorVal, motorVal);
cf086549 40
9738295a
SG
41 }
42
43 @Override
44 protected void execute() {
45
46 }
47
48 @Override
49 protected boolean isFinished() {
411129cd 50 return false;
9738295a
SG
51 }
52
53 @Override
54 protected void end() {
411129cd 55
9738295a
SG
56 }
57
58 @Override
59 protected void interrupted() {
a04ce2ff 60 end();
9738295a
SG
61 }
62}