1 package org
.usfirst
.frc
.team3501
.robot
.commands
.climber
;
3 import org
.usfirst
.frc
.team3501
.robot
.Robot
;
4 import org
.usfirst
.frc
.team3501
.robot
.subsystems
.DriveTrain
;
6 import edu
.wpi
.first
.wpilibj
.command
.Command
;
9 * This command runs the drive train motors (which runs the winch) continuously
10 * at a specified speed until the button triggering it is released
12 * pre-condition: This command must be run by a button in OI with
13 * button.whileHeld(...). The robot must be attached to the rope.
15 * post-condition: Drive train motors set to a specified speed.
17 * @author shivanighanta
20 public class RunWinchContinuous
extends Command
{
22 DriveTrain driveTrain
= Robot
.getDriveTrain();
23 private double climbingSpeed
;
26 * See JavaDoc comment in class for details
29 * value range is from -1 to 1
31 public RunWinchContinuous() {
33 climbingSpeed
= driveTrain
.CLIMBER_SPEED
;
34 requires(Robot
.getDriveTrain());
39 protected void initialize() {
43 protected void execute() {
44 Robot
.getDriveTrain().setMotorValues(climbingSpeed
, climbingSpeed
);
48 protected boolean isFinished() {
53 protected void end() {
58 protected void interrupted() {