Skip to content

Commit

Permalink
Use new filteredPoses method to close race condition
Browse files Browse the repository at this point in the history
  • Loading branch information
phurley67 committed Jan 26, 2024
1 parent 120eddc commit 962bf42
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/java/frc/robot/subsystems/Swerve.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ public void simulationPeriodic() {

@Override
public void periodic() {
for (Limelight limelight : Limelight.filterLimelights(limelights)) {
Pose4d pose = limelight.getAlliancePose();
for (Pose4d pose : Limelight.filteredPoses(limelights)) {
addVisionMeasurement(pose.toPose2d(), pose.getFPGATimestamp());
}

Expand Down

0 comments on commit 962bf42

Please sign in to comment.