Skip to content
This repository was archived by the owner on Dec 6, 2025. It is now read-only.

Commit 7ab2570

Browse files
committed
Fix timestamp issue after redeploy with no powercycle
1 parent 7a206c0 commit 7ab2570

File tree

1 file changed

+2
-4
lines changed
  • src/main/java/frc/robot/subsystems/swervedrive

1 file changed

+2
-4
lines changed

src/main/java/frc/robot/subsystems/swervedrive/Vision.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -529,9 +529,7 @@ private void updateUnreadResults()
529529
{
530530
mostRecentTimestamp = Math.max(mostRecentTimestamp, result.getTimestampSeconds());
531531
}
532-
if ((resultsList.isEmpty() || (currentTimestamp - mostRecentTimestamp >= debounceTime)) &&
533-
(currentTimestamp - lastReadTimestamp) >= debounceTime)
534-
{
532+
535533
resultsList = Robot.isReal() ? camera.getAllUnreadResults() : cameraSim.getCamera().getAllUnreadResults();
536534
lastReadTimestamp = currentTimestamp;
537535
resultsList.sort((PhotonPipelineResult a, PhotonPipelineResult b) -> {
@@ -541,7 +539,7 @@ private void updateUnreadResults()
541539
{
542540
updateEstimatedGlobalPose();
543541
}
544-
}
542+
545543
}
546544

547545
/**

0 commit comments

Comments
 (0)