Fix intake/expel ball methods by calling shooter subsystem instead of photogate class
authorniyatisriram <niyatisriram@gmail.com>
Wed, 17 Feb 2016 19:23:09 +0000 (11:23 -0800)
committerKevin Zhang <icestormf1@gmail.com>
Wed, 17 Feb 2016 20:33:40 +0000 (12:33 -0800)
src/org/usfirst/frc/team3501/robot/commands/intakearm/ExpelBall.java
src/org/usfirst/frc/team3501/robot/commands/intakearm/IntakeBall.java

index 83ee34e60fa285c05e2c046ce4ba1805b98f1842..04fa12687d012421bcc9ab2996e01665bc2208e4 100644 (file)
@@ -28,7 +28,7 @@ public class ExpelBall extends Command {
   @Override
   protected void initialize() {
     this.setTimeout(TIMEOUT_AMOUNT);
-    if (Robot.photogate.isBallPresent())
+    if (Robot.shooter.isBallInside())
       Robot.intakeArm.outputBall();
   }
 
@@ -38,7 +38,7 @@ public class ExpelBall extends Command {
 
   @Override
   protected boolean isFinished() {
-    return (this.isTimedOut() || !Robot.photogate.isBallPresent());
+    return (this.isTimedOut() || !Robot.shooter.isBallInside());
   }
 
   @Override
index 8eda8dba52c2aaa1ea16920d9f54d665cc314803..7966c6144b730ecefc61dc9e87f0a076c84dd8f5 100644 (file)
@@ -28,7 +28,7 @@ public class IntakeBall extends Command {
   @Override
   protected void initialize() {
     this.setTimeout(TIMEOUT_AMOUNT);
-    if (!Robot.photogate.isBallPresent())
+    if (!Robot.shooter.isBallInside())
       Robot.intakeArm.intakeBall();
 
   }
@@ -40,7 +40,7 @@ public class IntakeBall extends Command {
 
   @Override
   protected boolean isFinished() {
-    return (this.isTimedOut() || Robot.photogate.isBallPresent());
+    return (this.isTimedOut() || Robot.shooter.isBallInside());
   }
 
   @Override