Skip to content

Commit

Permalink
tested note detection
Browse files Browse the repository at this point in the history
  • Loading branch information
PGgit08 committed Apr 5, 2024
1 parent 2d51d56 commit 08e8426
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/frc/robot/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ public void robotInit() {
// for (int port = 5800; port <= 5807; port++) {
// PortForwarder.add(port, "limelight.local", port);
// }
PortForwarder.add(5800, "limelight-main.local", 5800);
PortForwarder.add(5801, "limelight-main.local", 5801);
PortForwarder.add(5805, "limelight-main.local", 5805);
PortForwarder.add(5800, "limelight-intake.local", 5800);
PortForwarder.add(5801, "limelight-intake.local", 5801);
PortForwarder.add(5805, "limelight-intake.local", 5805);

// PortForwarder.add(5810, "limelight-intake.local", 5810);
// PortForwarder.add(5811, "limelight-intake.local", 5811);
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/frc/robot/subsystems/VisionSubsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ public VisionSubsystem() {}
public void periodic() {
Optional<double[]> noteAngles = getNoteAngles();

SmartDashboard.putBoolean("SEES NOTE", getNoteAngles().isPresent());

if (noteAngles.isPresent()) {
SmartDashboard.putNumber("NOTE TX", noteAngles.get()[0]);
SmartDashboard.putNumber("NOTE TY", noteAngles.get()[1]);
Expand Down Expand Up @@ -61,6 +63,8 @@ public Optional<PoseEstimate> getBotposeBlue() {
public Optional<double[]> getNoteAngles() {
if (!isNoteVisible()) return Optional.empty();

SmartDashboard.putNumber("SHOULD BE RIGHT TX", LimelightHelper.getTX(Limelights.INTAKE));

double[] angles = {
LimelightHelper.getTX(Limelights.INTAKE),
LimelightHelper.getTY(Limelights.INTAKE)
Expand Down

0 comments on commit 08e8426

Please sign in to comment.