Make a getDistance() method in shooter to return value of lidar's distance from a...
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / subsystems / Shooter.java
index bbbbe57bd6cd7e6aefba21e2e09bae75b05f271f..f164ddfae39c6b623976bf9c1bf65ffc285d957b 100755 (executable)
@@ -56,6 +56,13 @@ public class Shooter extends Subsystem {
     shooter.set(speed);
   }
 
+  // This getDistance() will return the distance using the lidar from the
+  // desired target during match.
+  public double getDistance() {
+    double distance = lidar.getDistance();
+    return distance;
+  }
+
   public void stop() {
     this.setSpeed(0.0);
   }