Skip to content

Commit

Permalink
fix deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
srimanachanta committed Nov 20, 2023
1 parent 31d2049 commit 2a30b09
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions photon-lib/src/main/java/org/photonvision/PhotonCamera.java
Original file line number Diff line number Diff line change
Expand Up @@ -312,14 +312,14 @@ public boolean isConnected() {
public Optional<Matrix<N3, N3>> getCameraMatrix() {
var cameraMatrix = cameraIntrinsicsSubscriber.get();
if (cameraMatrix != null && cameraMatrix.length == 9) {
return Optional.of(new MatBuilder<>(Nat.N3(), Nat.N3()).fill(cameraMatrix));
return Optional.of(MatBuilder.fill(Nat.N3(), Nat.N3(), cameraMatrix));
} else return Optional.empty();
}

public Optional<Matrix<N5, N1>> getDistCoeffs() {
var distCoeffs = cameraDistortionSubscriber.get();
if (distCoeffs != null && distCoeffs.length == 5) {
return Optional.of(new MatBuilder<>(Nat.N5(), Nat.N1()).fill(distCoeffs));
return Optional.of(MatBuilder.fill(Nat.N5(), Nat.N1(), distCoeffs));
} else return Optional.empty();
}

Expand Down

0 comments on commit 2a30b09

Please sign in to comment.