Commit | Line | Data |
---|---|---|
898ac295 LM |
1 | package org.usfirst.frc.team3501.robot.commands; |
2 | ||
2a4a0ca5 | 3 | import org.usfirst.frc.team3501.robot.Robot; |
4 | ||
898ac295 LM |
5 | import edu.wpi.first.wpilibj.command.Command; |
6 | ||
7 | public class IntakeBall extends Command { | |
8 | ||
9 | public IntakeBall() { | |
df77579b | 10 | requires(Robot.intakeArm); |
898ac295 LM |
11 | } |
12 | ||
13 | @Override | |
14 | protected void initialize() { | |
2a4a0ca5 | 15 | if (!Robot.photogate.isBallPresent()) |
16 | Robot.intakeArm.intakeBall(); | |
898ac295 LM |
17 | |
18 | } | |
19 | ||
20 | @Override | |
21 | protected void execute() { | |
22 | ||
23 | } | |
24 | ||
25 | @Override | |
26 | protected boolean isFinished() { | |
2a4a0ca5 | 27 | return Robot.photogate.isBallPresent(); |
898ac295 LM |
28 | } |
29 | ||
30 | @Override | |
31 | protected void end() { | |
1828f5f6 | 32 | Robot.intakeArm.stopRollers(); |
898ac295 LM |
33 | |
34 | } | |
35 | ||
36 | @Override | |
37 | protected void interrupted() { | |
38 | ||
39 | } | |
40 | ||
41 | } |