5b45d0b4d3fad18e07e83f7272012843d03117e7
1 package org
.usfirst
.frc
.team3501
.robot
.commands
.scaler
;
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 * tirggering it is released.
11 * pre-condition: This command must be run by a button in OI with method
12 * whileHeld(). The robot must be attached to the tower rung.
14 * post-condition: winch motor set to a specified speed.
20 public class RunWinchContinuous
extends Command
{
21 private double winchUpSpeed
;
22 private int timeoutAmount
;
24 public RunWinchContinuous(double speed
, int timeout
) {
25 requires(Robot
.scaler
);
27 timeoutAmount
= timeout
;
31 protected void initialize() {
32 this.setTimeout(timeoutAmount
);
33 Robot
.scaler
.runWinch(winchUpSpeed
);
37 protected void execute() {
41 protected boolean isFinished() {
42 return this.isTimedOut();
46 protected void end() {
50 protected void interrupted() {