From 7c03b2d6585507476f703be79324338ff6443164 Mon Sep 17 00:00:00 2001 From: wilsonwatson Date: Thu, 10 Oct 2024 12:51:50 -0500 Subject: [PATCH] lint take 1 --- checks.xml | 2 +- src/main/java/frc/lib/util/photon/LoggedPhotonCamera.java | 4 ++++ src/main/java/frc/lib/util/photon/PhotonCameraWrapper.java | 1 - 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/checks.xml b/checks.xml index f4f41c54..67cbaef5 100644 --- a/checks.xml +++ b/checks.xml @@ -319,7 +319,7 @@ value="^@return the *|^This method returns |^A [{]@code [_a-zA-Z0-9]+[}]( is a )"/> --> - + diff --git a/src/main/java/frc/lib/util/photon/LoggedPhotonCamera.java b/src/main/java/frc/lib/util/photon/LoggedPhotonCamera.java index f029ffc7..4352c17e 100644 --- a/src/main/java/frc/lib/util/photon/LoggedPhotonCamera.java +++ b/src/main/java/frc/lib/util/photon/LoggedPhotonCamera.java @@ -27,8 +27,10 @@ import edu.wpi.first.wpilibj.Timer; import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; +/** PhotonCamera modified to work with AdvantageKit */ public class LoggedPhotonCamera extends PhotonCamera { + /** Inputs for LoggedPhotonCamera */ public static class PhotonCameraInputs implements LoggableInputs, Cloneable { public PhotonPipelineResult result = null; public Optional> cameraMatrix = Optional.empty(); @@ -86,6 +88,7 @@ public void fromLog(LogTable table) { private final PhotonCameraInputs inputs = new PhotonCameraInputs(); + /** Create PhotonCamera with a given name and IP. */ public LoggedPhotonCamera(String cameraName, String cameraIP) { super(cameraName); inputs.name = cameraName; @@ -106,6 +109,7 @@ public LoggedPhotonCamera(String cameraName, String cameraIP) { }).start(); } + /** Update inputs for this camera. */ public void periodic() { this.inputs.result = super.getLatestResult(); this.inputs.cameraMatrix = super.getCameraMatrix(); diff --git a/src/main/java/frc/lib/util/photon/PhotonCameraWrapper.java b/src/main/java/frc/lib/util/photon/PhotonCameraWrapper.java index 75c5622a..de2d5066 100644 --- a/src/main/java/frc/lib/util/photon/PhotonCameraWrapper.java +++ b/src/main/java/frc/lib/util/photon/PhotonCameraWrapper.java @@ -28,7 +28,6 @@ public class PhotonCameraWrapper { /** * PhotonCamera-based Pose Estimator. * - * @param io Camera IO. * @param robotToCam transform from robot body coordinates to camera coordinates. */ public PhotonCameraWrapper(String name, String cameraIP, Transform3d robotToCam) {