Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
Merge branch 'main' into fresno-comp
Browse files Browse the repository at this point in the history
  • Loading branch information
maxspier authored Mar 26, 2024
2 parents 6675e2d + f1b869d commit 627e78b
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,22 @@ public GrayScaleCamera getCamera() {
}

public void run() {
if (tagId == -1) {
Optional<Alliance> alliance = DriverStation.getAlliance();

if (alliance.isPresent()) {
if (alliance.get().equals(Alliance.Blue)) {
tagId = 7;
} else {
tagId = 4;
}
Robot.lights.signalCameraConnected();
} else {
LoggerExceptionUtils.logException(
new AprilTagGeneralCheckedException("Couldn't find alliance correctly"));
}
}

try {
if (tagId == -1) {
Optional<Alliance> alliance = DriverStation.getAlliance();
Expand Down

0 comments on commit 627e78b

Please sign in to comment.