Initialize photogate in shooter subsystem
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / subsystems / Shooter.java
index bcce7bcdc2df74ff7de1491ff96cb5dc12d97b51..60452a0c9080bfe4bf61beb2c129ce0be2b37717 100755 (executable)
@@ -2,6 +2,7 @@ package org.usfirst.frc.team3501.robot.subsystems;
 
 import org.usfirst.frc.team3501.robot.Constants;
 import org.usfirst.frc.team3501.robot.sensors.Lidar;
+import org.usfirst.frc.team3501.robot.sensors.Photogate;
 
 import edu.wpi.first.wpilibj.CANTalon;
 import edu.wpi.first.wpilibj.CounterBase.EncodingType;
@@ -25,6 +26,7 @@ public class Shooter extends Subsystem {
   private DoubleSolenoid hood, punch;
   private Encoder encoder;
   private Lidar lidar;
+  private Photogate photogate;
 
   public Shooter() {
     shooter = new CANTalon(Constants.Shooter.PORT);
@@ -45,7 +47,7 @@ public class Shooter extends Subsystem {
    */
 
   public boolean isBallInside() {
-    return true;
+    return photogate.isBallPresent();
   }
 
   public void setSpeed(double speed) {