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 will run the winch motor continuously until the button
9 * triggering it is released. This command also makes the drive train motors run
10 * 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.
18 * value range is from -1 to 1
20 * @author shivanighanta
23 public class RunWinchContinuous
extends Command
{
24 private double motorVal
;
27 * See JavaDoc comment in class for details
30 * value range is from -1 to 1
32 public RunWinchContinuous(double motorVal
) {
33 requires(Robot
.getDriveTrain());
34 this.motorVal
= motorVal
;
38 protected void initialize() {
39 Robot
.getDriveTrain().setMotorValues(motorVal
, motorVal
);
44 protected void execute() {
49 protected boolean isFinished() {
54 protected void end() {
59 protected void interrupted() {