Skip to content

Commit

Permalink
fix: correct target area units
Browse files Browse the repository at this point in the history
  • Loading branch information
mimizh2418 committed Sep 15, 2024
1 parent 01012c0 commit c92b957
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.team1540.robot2024.subsystems.vision.gamepiece;

import edu.wpi.first.wpilibj2.command.SubsystemBase;
import org.team1540.robot2024.Constants;
import org.team1540.robot2024.util.vision.GamepieceDetection;

import static org.team1540.robot2024.Constants.Vision.Gamepiece.*;
Expand All @@ -28,7 +27,7 @@ public GamepieceDetection getLatestDetection() {
inputs.lastDetectionTimestampSecs,
inputs.targetPitchRads,
inputs.targetYawRads,
inputs.targetAreaRads,
inputs.targetArea,
inputs.targetClass);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class NoteVisionIOInputs {
public double lastDetectionTimestampSecs = 0.0;
public double targetPitchRads = 0.0;
public double targetYawRads = 0.0;
public double targetAreaRads = 0.0;
public double targetArea = 0.0;
public String targetClass = "";
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public void updateInputs(NoteVisionIOInputs inputs) {
/ 1000.0);
inputs.targetPitchRads = Math.toRadians(LimelightHelpers.getTY(name));
inputs.targetYawRads = Math.toRadians(LimelightHelpers.getTX(name));
inputs.targetAreaRads = LimelightHelpers.getTA(name);
inputs.targetArea = LimelightHelpers.getTA(name);
inputs.targetClass = LimelightHelpers.getNeuralClassID(name);
}
}
Expand Down

0 comments on commit c92b957

Please sign in to comment.