diff --git a/photon-client/src/components/cameras/CameraCalibrationCard.vue b/photon-client/src/components/cameras/CameraCalibrationCard.vue index 29b4d2b888..d9eca1a369 100644 --- a/photon-client/src/components/cameras/CameraCalibrationCard.vue +++ b/photon-client/src/components/cameras/CameraCalibrationCard.vue @@ -102,7 +102,7 @@ const downloadCalibBoard = () => { const yPos = chessboardStartY + squareY * squareSizeIn.value; // Only draw the odd squares to create the chessboard pattern - if ((xPos + yPos + 0.25) % 2 === 0) { + if (squareY % 2 != squareX % 2) { doc.rect(xPos, yPos, squareSizeIn.value, squareSizeIn.value, "F"); } } diff --git a/photon-core/src/main/java/org/photonvision/vision/camera/USBCameraSource.java b/photon-core/src/main/java/org/photonvision/vision/camera/USBCameraSource.java index 9548fd2c19..15f67200ad 100644 --- a/photon-core/src/main/java/org/photonvision/vision/camera/USBCameraSource.java +++ b/photon-core/src/main/java/org/photonvision/vision/camera/USBCameraSource.java @@ -395,6 +395,7 @@ public HashMap getAllVideoModes() { // Sort by resolution var sortedList = videoModesList.stream() + .distinct() // remove redundant video mode entries .sorted(((a, b) -> (b.width + b.height) - (a.width + a.height))) .collect(Collectors.toList()); Collections.reverse(sortedList); diff --git a/photon-lib/src/main/java/org/photonvision/PhotonPoseEstimator.java b/photon-lib/src/main/java/org/photonvision/PhotonPoseEstimator.java index f93c499140..6b217c9b73 100644 --- a/photon-lib/src/main/java/org/photonvision/PhotonPoseEstimator.java +++ b/photon-lib/src/main/java/org/photonvision/PhotonPoseEstimator.java @@ -408,8 +408,8 @@ private Optional update( return Optional.empty(); } - if (estimatedPose.isEmpty()) { - lastPose = null; + if (estimatedPose.isPresent()) { + lastPose = estimatedPose.get().estimatedPose; } return estimatedPose; diff --git a/photon-lib/src/main/native/cpp/photon/PhotonPoseEstimator.cpp b/photon-lib/src/main/native/cpp/photon/PhotonPoseEstimator.cpp index 30bc6de2df..d14394b999 100644 --- a/photon-lib/src/main/native/cpp/photon/PhotonPoseEstimator.cpp +++ b/photon-lib/src/main/native/cpp/photon/PhotonPoseEstimator.cpp @@ -186,6 +186,9 @@ std::optional PhotonPoseEstimator::Update( ret = std::nullopt; } + if (ret) { + lastPose = ret.value().estimatedPose; + } return ret; }