Add JoystickButton objects and constants for Drivetrain, Climer, Intake, and Shooter
[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 runs the drive train motors (which runs the winch) continuously
9 * at a specified speed until the button triggering it is released
10 *
11 * pre-condition: This command must be run by a button in OI with
12 * button.whileHeld(...). The robot must be attached to the rope.
13 *
14 * post-condition: Drive train motors set to a specified speed.
15 *
16 * @author shivanighanta
17 *
18 */
19 public class RunWinchContinuous extends Command {
20
21 /**
22 * See JavaDoc comment in class for details
23 *
24 * @param motorVal
25 * value range is from -1 to 1
26 */
27 public RunWinchContinuous() {
28 requires(Robot.getDriveTrain());
29 }
30
31 @Override
32 protected void initialize() {
33 Robot.getDriveTrain().setMotorValues(
34 Robot.getDriveTrain().getClimbingSpeed(),
35 Robot.getDriveTrain().getClimbingSpeed());
36 }
37
38 @Override
39 protected void execute() {
40
41 }
42
43 @Override
44 protected boolean isFinished() {
45 return false;
46 }
47
48 @Override
49 protected void end() {
50
51 }
52
53 @Override
54 protected void interrupted() {
55 end();
56 }
57 }