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 | ||
5a3fcb1c LM |
7 | /*** |
8 | * This command will set the winch motor to a specified speed. | |
9 | * | |
10 | * pre-condition: This command must be run by a button in OI with method | |
11 | * whileHeld() | |
12 | * | |
13 | * post-condition: winch motor set to a specified speed. | |
14 | * | |
d4649cd7 | 15 | * @author Lauren |
5a3fcb1c LM |
16 | * |
17 | */ | |
18 | ||
aef97dd8 | 19 | public class SetWinchSpeed extends Command { |
0d4d5dcb LM |
20 | double winchUpSpeed; |
21 | ||
aef97dd8 | 22 | public SetWinchSpeed(double speed) { |
0ecbf4af | 23 | requires(Robot.scaler); |
0d4d5dcb | 24 | winchUpSpeed = speed; |
0d4d5dcb LM |
25 | } |
26 | ||
27 | @Override | |
28 | protected void initialize() { | |
29 | Robot.scaler.runWinch(winchUpSpeed); | |
30 | } | |
31 | ||
32 | @Override | |
33 | protected void execute() { | |
34 | } | |
35 | ||
36 | @Override | |
37 | protected boolean isFinished() { | |
38 | return true; | |
39 | } | |
40 | ||
41 | @Override | |
42 | protected void end() { | |
43 | } | |
44 | ||
45 | @Override | |
46 | protected void interrupted() { | |
47 | } | |
48 | } |