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