write ExpellBall code using photogate tests
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / commands / ExpelBall.java
index 71f877327c7a672bbeedfa6b59761076a8c4fcc3..573bd9048cdef6fbabb75ed98b343494cd2f6bd4 100644 (file)
@@ -1,5 +1,7 @@
 package org.usfirst.frc.team3501.robot.commands;
 
+import org.usfirst.frc.team3501.robot.Robot;
+
 import edu.wpi.first.wpilibj.command.Command;
 
 public class ExpelBall extends Command {
@@ -9,17 +11,17 @@ public class ExpelBall extends Command {
 
   @Override
   protected void initialize() {
-
+    if (Robot.photogate.isBallPresent())
+      Robot.intakeArm.outputBall();
   }
 
   @Override
   protected void execute() {
-
   }
 
   @Override
   protected boolean isFinished() {
-    return true;
+    return !Robot.photogate.isBallPresent();
   }
 
   @Override