Commit | Line | Data |
---|---|---|
2781cca0 ME |
1 | package org.usfirst.frc.team3501.robot.commands.intakearm; |
2 | ||
3 | import org.usfirst.frc.team3501.robot.Constants; | |
4 | import org.usfirst.frc.team3501.robot.Robot; | |
5 | ||
6 | import edu.wpi.first.wpilibj.DoubleSolenoid.Value; | |
7 | import edu.wpi.first.wpilibj.command.Command; | |
8 | ||
9 | /** | |
10 | * This command will expand or retract the intake arm's pistons depending on the | |
11 | * specified direction the intake arm should move | |
12 | */ | |
13 | public class MoveIntakeArm extends Command { | |
e1f7a742 | 14 | Value direction; |
2781cca0 ME |
15 | |
16 | public MoveIntakeArm(Value direction) { | |
e1f7a742 HD |
17 | requires(Robot.intakeArm); |
18 | this.direction = direction; | |
19 | } | |
2781cca0 | 20 | |
e1f7a742 HD |
21 | @Override |
22 | protected void initialize() { | |
2781cca0 ME |
23 | if (direction == Constants.IntakeArm.EXTEND) |
24 | Robot.intakeArm.extendPistons(); | |
25 | else | |
26 | Robot.intakeArm.retractPistons(); | |
27 | } | |
28 | ||
2781cca0 ME |
29 | @Override |
30 | protected void execute() { | |
31 | } | |
32 | ||
33 | @Override | |
34 | protected boolean isFinished() { | |
e1f7a742 | 35 | return true; |
2781cca0 ME |
36 | } |
37 | ||
38 | @Override | |
39 | protected void end() { | |
40 | } | |
41 | ||
42 | @Override | |
43 | protected void interrupted() { | |
44 | } | |
45 | } |