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) { |
0d4d5dcb LM |
11 | winchUpSpeed = speed; |
12 | if (winchUpSpeed > 1) | |
13 | winchUpSpeed = 1; | |
14 | if (winchUpSpeed < -1) | |
15 | winchUpSpeed = -1; | |
16 | } | |
17 | ||
18 | @Override | |
19 | protected void initialize() { | |
20 | Robot.scaler.runWinch(winchUpSpeed); | |
21 | } | |
22 | ||
23 | @Override | |
24 | protected void execute() { | |
25 | } | |
26 | ||
27 | @Override | |
28 | protected boolean isFinished() { | |
29 | return true; | |
30 | } | |
31 | ||
32 | @Override | |
33 | protected void end() { | |
34 | } | |
35 | ||
36 | @Override | |
37 | protected void interrupted() { | |
38 | } | |
39 | } |