Commit | Line | Data |
---|---|---|
0d4d5dcb LM |
1 | package org.usfirst.frc.team3501.robot.commands; |
2 | ||
3 | import org.usfirst.frc.team3501.robot.Robot; | |
4 | ||
5 | import edu.wpi.first.wpilibj.command.Command; | |
6 | ||
aef97dd8 | 7 | public class SetWinchSpeed extends Command { |
0d4d5dcb LM |
8 | double winchUpSpeed; |
9 | ||
aef97dd8 | 10 | public SetWinchSpeed(double speed) { |
0ecbf4af | 11 | requires(Robot.scaler); |
0d4d5dcb LM |
12 | winchUpSpeed = speed; |
13 | if (winchUpSpeed > 1) | |
14 | winchUpSpeed = 1; | |
15 | if (winchUpSpeed < -1) | |
16 | winchUpSpeed = -1; | |
17 | } | |
18 | ||
19 | @Override | |
20 | protected void initialize() { | |
21 | Robot.scaler.runWinch(winchUpSpeed); | |
22 | } | |
23 | ||
24 | @Override | |
25 | protected void execute() { | |
26 | } | |
27 | ||
28 | @Override | |
29 | protected boolean isFinished() { | |
30 | return true; | |
31 | } | |
32 | ||
33 | @Override | |
34 | protected void end() { | |
35 | } | |
36 | ||
37 | @Override | |
38 | protected void interrupted() { | |
39 | } | |
40 | } |