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