Commit | Line | Data |
---|---|---|
571a0e2a HD |
1 | package org.usfirst.frc.team3501.robot.commands.intakearm; |
2 | ||
e1f7a742 | 3 | import org.usfirst.frc.team3501.robot.Constants; |
571a0e2a HD |
4 | import org.usfirst.frc.team3501.robot.Robot; |
5 | ||
6 | import edu.wpi.first.wpilibj.command.Command; | |
7 | ||
8 | public class RunIntake extends Command { | |
e1f7a742 | 9 | int direction; |
571a0e2a | 10 | |
e1f7a742 | 11 | public RunIntake(int direction) { |
571a0e2a | 12 | requires(Robot.intakeArm); |
e1f7a742 | 13 | this.direction = direction; |
571a0e2a HD |
14 | } |
15 | ||
16 | @Override | |
17 | protected void initialize() { | |
e1f7a742 HD |
18 | if (direction == Constants.IntakeArm.IN) |
19 | Robot.intakeArm.intakeBall(); | |
20 | else | |
21 | Robot.intakeArm.outputBall(); | |
571a0e2a HD |
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 | ||
41 | } |