Make a getDistance() method in shooter to return value of lidar's distance from a...
authorEvanYap <evanyap.14@gmail.com>
Mon, 15 Feb 2016 21:42:27 +0000 (13:42 -0800)
committerEvanYap <evanyap.14@gmail.com>
Mon, 15 Feb 2016 21:42:27 +0000 (13:42 -0800)
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);
   }