From f19a94ad4127fc33806e1c1aaa591589e964778e Mon Sep 17 00:00:00 2001 From: Lauren Meier Date: Tue, 9 Feb 2016 19:36:05 -0800 Subject: [PATCH] write ExpellBall code using photogate tests --- .../usfirst/frc/team3501/robot/commands/ExpelBall.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/org/usfirst/frc/team3501/robot/commands/ExpelBall.java b/src/org/usfirst/frc/team3501/robot/commands/ExpelBall.java index 71f87732..573bd904 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/ExpelBall.java +++ b/src/org/usfirst/frc/team3501/robot/commands/ExpelBall.java @@ -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 -- 2.30.2