1 package org
.usfirst
.frc
.team3501
.robot
.commands
.climber
;
3 import org
.usfirst
.frc
.team3501
.robot
.Robot
;
5 import edu
.wpi
.first
.wpilibj
.command
.Command
;
8 * This command runs the winch motor continuously at a specified speed until the
9 * button triggering it is released. This command also makes the drive train
10 * motors run because the winch is controlled by the drive train.
12 * pre-condition: This command must be run by a button in OI. The robot must be
13 * attached to the rope.
15 * post-condition: Winch motor set to a specified speed.
17 * @author shivanighanta
20 public class RunWinchContinuous
extends Command
{
21 private double motorVal
;
24 * See JavaDoc comment in class for details
27 * value range is from -1 to 1
29 public RunWinchContinuous(double motorVal
) {
30 requires(Robot
.getDriveTrain());
31 this.motorVal
= motorVal
;
35 protected void initialize() {
36 Robot
.getDriveTrain().setMotorValues(motorVal
, motorVal
);
40 protected void execute() {
45 protected boolean isFinished() {
46 return !Robot
.getOI().toggleWinch
.get();
50 protected void end() {
55 protected void interrupted() {