Add JoystickButton objects and constants for Drivetrain, Climer, Intake, and Shooter
[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/**
d8ebba03
CZ
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
e2e9a7a7 10 *
2a9dabb1
CZ
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.
e2e9a7a7 13 *
d8ebba03 14 * post-condition: Drive train motors set to a specified speed.
e2e9a7a7 15 *
9738295a
SG
16 * @author shivanighanta
17 *
18 */
19public class RunWinchContinuous extends Command {
9738295a 20
ad877a7e 21 /**
411129cd
SG
22 * See JavaDoc comment in class for details
23 *
ad877a7e 24 * @param motorVal
411129cd 25 * value range is from -1 to 1
ad877a7e 26 */
cef1f36d 27 public RunWinchContinuous() {
411129cd 28 requires(Robot.getDriveTrain());
9738295a
SG
29 }
30
31 @Override
32 protected void initialize() {
cef1f36d
RR
33 Robot.getDriveTrain().setMotorValues(
34 Robot.getDriveTrain().getClimbingSpeed(),
35 Robot.getDriveTrain().getClimbingSpeed());
9738295a
SG
36 }
37
38 @Override
39 protected void execute() {
40
41 }
42
43 @Override
44 protected boolean isFinished() {
3e515b75 45 return false;
9738295a
SG
46 }
47
48 @Override
49 protected void end() {
411129cd 50
9738295a
SG
51 }
52
53 @Override
54 protected void interrupted() {
a04ce2ff 55 end();
9738295a
SG
56 }
57}