Commit | Line | Data |
---|---|---|
6bb7f8ac | 1 | package org.usfirst.frc.team3501.robot.commands.scaler; |
00b68bad | 2 | |
39a39f43 | 3 | import org.usfirst.frc.team3501.robot.Constants; |
20718a00 | 4 | import org.usfirst.frc.team3501.robot.Robot; |
5 | ||
00b68bad YN |
6 | import edu.wpi.first.wpilibj.command.Command; |
7 | ||
00b68bad | 8 | public class ClampBar extends Command { |
39a39f43 | 9 | private double speed = 0; |
20718a00 | 10 | |
39a39f43 KZ |
11 | public ClampBar(double speed) { |
12 | this.speed = speed; | |
20718a00 | 13 | } |
14 | ||
15 | @Override | |
16 | protected void initialize() { | |
39a39f43 KZ |
17 | setTimeout(Constants.Scaler.SECONDS_TO_CLAMP); |
18 | Robot.scaler.runWinch(this.speed); | |
20718a00 | 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 | } |