Skip to content

Commit

Permalink
lint take 1
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsonwatson committed Oct 10, 2024
1 parent 03a7b87 commit 7c03b2d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion checks.xml
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@
value="^@return the *|^This method returns |^A [{]@code [_a-zA-Z0-9]+[}]( is a )"/>
</module> -->
<module name="JavadocParagraph">
<property name="allowNewlineParagraph" value="false"/>
<property name="allowNewlineParagraph" value="true"/>
</module>
<module name="JavadocStyle">
<property name="checkFirstSentence" value="false"/>
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/frc/lib/util/photon/LoggedPhotonCamera.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<Matrix<N3, N3>> cameraMatrix = Optional.empty();
Expand Down Expand Up @@ -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;
Expand All @@ -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();
Expand Down
1 change: 0 additions & 1 deletion src/main/java/frc/lib/util/photon/PhotonCameraWrapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 7c03b2d

Please sign in to comment.