package org.usfirst.frc.team3501.robot.commands;
+import org.usfirst.frc.team3501.robot.Robot;
+
import edu.wpi.first.wpilibj.command.Command;
public class IntakeBall extends Command {
@Override
protected void initialize() {
+ if (!Robot.photogate.isBallPresent())
+ Robot.intakeArm.intakeBall();
}
@Override
protected boolean isFinished() {
- return true;
+ return Robot.photogate.isBallPresent();
}
@Override