1 package org
.usfirst
.frc
.team3501
.robot
.commands
.climber
;
3 import org
.usfirst
.frc
.team3501
.robot
.Robot
;
5 import com
.sun
.glass
.ui
.Timer
;
7 import edu
.wpi
.first
.wpilibj
.command
.Command
;
10 * Runs the winch for a given time and motor value
12 * @author shivanighanta
15 public class RunWinch
extends Command
{
18 private double motorVal
;
20 public RunWinch(double time
, double motorVal
) {
21 requires(Robot
.getClimber());
23 this.motorVal
= motorVal
;
27 protected void initialize() {
29 Robot
.getClimber().setMotorValue(motorVal
);
33 protected void execute() {
38 protected boolean isFinished() {
39 return timer
.get() >= time
;
43 protected void end() {
44 Robot
.getClimber().stop();
48 protected void interrupted() {