From 3c25b4b39b19962f4670c633fa640363fb4d390f Mon Sep 17 00:00:00 2001 From: Antoine PerreaultE Date: Tue, 30 Jan 2024 18:16:02 -0500 Subject: [PATCH 1/2] n --- .../java/frc/robot/subsystem/Limelight.java | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/src/main/java/frc/robot/subsystem/Limelight.java b/src/main/java/frc/robot/subsystem/Limelight.java index e26d582..9fb068b 100644 --- a/src/main/java/frc/robot/subsystem/Limelight.java +++ b/src/main/java/frc/robot/subsystem/Limelight.java @@ -4,20 +4,31 @@ package frc.robot.subsystem; +import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; +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; + public class Limelight extends SubsystemBase { /** Creates a new Limelight. */ public Limelight() { - boolean tv = LimelightHelpers.getTV("No_name"); + NetworkTable table = NetworkTableInstance.getDefault().getTable("limelight"); + NetworkTableEntry tx = table.getEntry("tx"); + NetworkTableEntry ty = table.getEntry("ty"); + NetworkTableEntry ta = table.getEntry("ta"); + + double x = tx.getDouble(0.0); + double y = ty.getDouble(0.0); + double area = ta.getDouble(0.0); + + SmartDashboard.putNumber("LimelightX", x); + SmartDashboard.putNumber("LimelightY", y); + SmartDashboard.putNumber("LimelightArea", area); - double tx = LimelightHelpers.getTX("No_name"); - double ty = LimelightHelpers.getTY("No_name"); - double ta = LimelightHelpers.getTA("No_name"); } From 03cdfadb6d3ce7ba69bd0e9bdde704b661c7790e Mon Sep 17 00:00:00 2001 From: OlivierDubois Date: Tue, 30 Jan 2024 18:18:22 -0500 Subject: [PATCH 2/2] Guideur guideur guiderHaut --- src/main/java/frc/robot/command/GuiderHaut.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/frc/robot/command/GuiderHaut.java b/src/main/java/frc/robot/command/GuiderHaut.java index 586ebbd..1eb052e 100644 --- a/src/main/java/frc/robot/command/GuiderHaut.java +++ b/src/main/java/frc/robot/command/GuiderHaut.java @@ -10,7 +10,7 @@ import frc.robot.subsystem.Guideur; public class GuiderHaut extends Command { private Guideur guideur; /** Creates a new GuiderHaut. */ - public GuiderHaut() { + public GuiderHaut(Guideur guideur) { this.guideur = guideur; addRequirements(guideur); // Use addRequirements() here to declare subsystem dependencies.