a3e6f3f2d06afdcb881cf1b69cc2eaac152b4ad1
[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 * <<<<<<< 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
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 *
29 * @author shivanighanta
30 *
31 */
32 public class RunWinchContinuous extends Command {
33 private double motorVal;
34
35 /**
36 * See JavaDoc comment in class for details
37 *
38 * @param motorVal
39 * value range is from -1 to 1
40 */
41 public RunWinchContinuous(double motorVal) {
42 requires(Robot.getDriveTrain());
43 this.motorVal = motorVal;
44 }
45
46 @Override
47 protected void initialize() {
48 Robot.getDriveTrain().setMotorValues(motorVal, motorVal);
49 }
50
51 @Override
52 protected void execute() {
53
54 }
55
56 @Override
57 protected boolean isFinished() {
58 return false;
59 }
60
61 @Override
62 protected void end() {
63
64 }
65
66 @Override
67 protected void interrupted() {
68 end();
69 }
70 }