1 package org
.usfirst
.frc
.team3501
.robot
.commands
.climber
;
3 import org
.usfirst
.frc
.team3501
.robot
.OI
;
4 import org
.usfirst
.frc
.team3501
.robot
.Robot
;
5 import org
.usfirst
.frc
.team3501
.robot
.subsystems
.Climber
;
7 import edu
.wpi
.first
.wpilibj
.command
.Command
;
10 * This command runs the drive train motors (which runs the winch) continuously
11 * at a specified speed until the button triggering it is released
13 * pre-condition: This command must be run by a button in OI with
14 * button.whileHeld(...). The robot must be attached to the rope.
16 * post-condition: Drive train motors set to a specified speed.
18 * @author shivanighanta
21 public class RunWinchContinuous
extends Command
{
22 Climber climber
= Robot
.getClimber();
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
= climber
.CLIMBER_SPEED
;
37 protected void initialize() {
38 climber
.setCANTalonsBrakeMode(climber
.COAST_MODE
);
42 protected void execute() {
43 double thrust
= OI
.xboxController
.getY();
44 climber
.setMotorValues(-thrust
);
48 protected boolean isFinished() {
53 protected void end() {
58 protected void interrupted() {