Commit | Line | Data |
---|---|---|
00b68bad YN |
1 | package org.usfirst.frc.team3501.robot.commands; |
2 | ||
20718a00 | 3 | import org.usfirst.frc.team3501.robot.Robot; |
4 | ||
00b68bad YN |
5 | import edu.wpi.first.wpilibj.command.Command; |
6 | ||
00b68bad | 7 | public class ClampBar extends Command { |
20718a00 | 8 | private double secondsToClamp = 2.0; // seconds for the winch to run in order |
9 | // for it to clamp(requires testing) | |
10 | private double winchSpeed = 0.5; // requires testing | |
11 | ||
12 | public ClampBar() { | |
13 | } | |
14 | ||
15 | @Override | |
16 | protected void initialize() { | |
17 | setTimeout(secondsToClamp); | |
18 | Robot.scaler.runWinch(winchSpeed); | |
19 | } | |
20 | ||
21 | @Override | |
22 | protected void execute() { | |
23 | } | |
24 | ||
25 | @Override | |
26 | protected boolean isFinished() { | |
27 | return isTimedOut(); | |
28 | } | |
29 | ||
30 | @Override | |
31 | protected void end() { | |
32 | Robot.scaler.runWinch(0); | |
33 | } | |
34 | ||
35 | @Override | |
36 | protected void interrupted() { | |
37 | end(); | |
38 | } | |
00b68bad | 39 | } |