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() {
41 protected void execute() {
42 double thrust
= OI
.xboxController
.getY();
43 climber
.setMotorValues(-thrust
);
47 protected boolean isFinished() {
52 protected void end() {
57 protected void interrupted() {