diff --git a/src/main/java/frc/robot/subsystem/Limelight.java b/src/main/java/frc/robot/subsystem/Limelight.java index 9fb068b..176616d 100644 --- a/src/main/java/frc/robot/subsystem/Limelight.java +++ b/src/main/java/frc/robot/subsystem/Limelight.java @@ -9,6 +9,7 @@ import edu.wpi.first.networktables.NetworkTable; import edu.wpi.first.networktables.NetworkTableEntry; import edu.wpi.first.networktables.NetworkTableInstance; import edu.wpi.first.wpilibj2.command.SubsystemBase; +import frc.robot.LimelightHelpers; @@ -16,14 +17,26 @@ public class Limelight extends SubsystemBase { /** Creates a new Limelight. */ public Limelight() { - NetworkTable table = NetworkTableInstance.getDefault().getTable("limelight"); + NetworkTable table = NetworkTableInstance.getDefault().getTable("limelight"); + NetworkTableInstance.getDefault().getTable("limelight").getEntry("Tv").getDouble(0); + NetworkTableInstance.getDefault().getTable("limelight").getEntry("getpipe").getDouble(1); + NetworkTableInstance.getDefault().getTable("limelight").getEntry("").getDoubleArray(new double[6]); + + NetworkTableEntry tx = table.getEntry("tx"); NetworkTableEntry ty = table.getEntry("ty"); NetworkTableEntry ta = table.getEntry("ta"); + NetworkTableEntry botpose = table.getEntry("pose"); + NetworkTableEntry getpipe = table.getEntry(getName()); double x = tx.getDouble(0.0); double y = ty.getDouble(0.0); double area = ta.getDouble(0.0); + double pose = botpose.getDouble(area); + + + + SmartDashboard.putNumber("LimelightX", x); SmartDashboard.putNumber("LimelightY", y);