Commit | Line | Data |
---|---|---|
ab918627 SC |
1 | package org.usfirst.frc.team3501.robot.commands; |
2 | ||
bcfe756d | 3 | import org.usfirst.frc.team3501.robot.Robot; |
ab918627 | 4 | |
bcfe756d SC |
5 | import edu.wpi.first.wpilibj.command.Command; |
6 | ||
1269b39b | 7 | public class RaiseDefenseArmContinuous extends Command { |
bcfe756d SC |
8 | |
9 | private double speed; | |
10 | ||
1269b39b | 11 | public RaiseDefenseArmContinuous(double speed) { |
bcfe756d SC |
12 | requires(Robot.defenseArm); |
13 | this.speed = speed; | |
14 | } | |
15 | ||
16 | @Override | |
17 | protected void initialize() { | |
18 | Robot.defenseArm.setArmSpeed(speed); | |
19 | } | |
20 | ||
21 | @Override | |
22 | protected void execute() { | |
23 | } | |
24 | ||
25 | @Override | |
26 | protected boolean isFinished() { | |
47ef33b1 | 27 | return true; |
bcfe756d SC |
28 | } |
29 | ||
30 | @Override | |
31 | protected void end() { | |
32 | Robot.defenseArm.setArmSpeed(0); | |
33 | } | |
34 | ||
35 | @Override | |
36 | protected void interrupted() { | |
37 | end(); | |
38 | } | |
ab918627 | 39 | } |