From 95f05eb0afbbdf719de43f579b6d69e1758b1d3c Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Wed, 17 Feb 2016 12:42:56 -0800 Subject: [PATCH] fix errors --- .../usfirst/frc/team3501/robot/subsystems/Shooter.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java b/src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java index 91793d8a..ab5eb66f 100755 --- a/src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java +++ b/src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java @@ -26,6 +26,7 @@ public class Shooter extends Subsystem { private Encoder encoder; private Lidar lidar; private Photogate photogate; + private boolean usePhotoGate; public Shooter() { shooter = new CANTalon(Constants.Shooter.PORT); @@ -38,6 +39,7 @@ public class Shooter extends Subsystem { encoder = new Encoder(Constants.Shooter.ENCODER_PORT_A, Constants.Shooter.ENCODER_PORT_B, false, EncodingType.k4X); + usePhotoGate = true; } /*** @@ -52,7 +54,7 @@ public class Shooter extends Subsystem { if (usePhotogate()) return photogate.isBallPresent(); else - return false; + return true; } public void setSpeed(double speed) { @@ -117,7 +119,11 @@ public class Shooter extends Subsystem { } public boolean usePhotogate() { - return true; + return this.usePhotoGate; + } + + public void togglePhotoGate() { + this.usePhotoGate = !this.usePhotoGate; } @Override -- 2.30.2