55039a5e2af158dfaeb0638b7f69df8489ebcfff
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / commands / IntakeBall.java
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
7 public class IntakeBall extends Command {
8
9 public IntakeBall() {
10 requires(Robot.intakeArm);
11 }
12
13 @Override
14 protected void initialize() {
15 if (!Robot.photogate.isBallPresent())
16 Robot.intakeArm.intakeBall();
17
18 }
19
20 @Override
21 protected void execute() {
22
23 }
24
25 @Override
26 protected boolean isFinished() {
27 return Robot.photogate.isBallPresent();
28 }
29
30 @Override
31 protected void end() {
32
33 }
34
35 @Override
36 protected void interrupted() {
37
38 }
39
40 }