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

Commit

Permalink
fix merge issue
Browse files Browse the repository at this point in the history
  • Loading branch information
dejabot committed Apr 5, 2024
1 parent f239657 commit 572055d
Showing 1 changed file with 3 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.team766.logging.LoggerExceptionUtils;
import com.team766.logging.ShuffleboardUtil;
import com.team766.robot.reva.Robot;
import com.team766.robot.reva.constants.VisionConstants;
import edu.wpi.first.math.geometry.Transform3d;
import edu.wpi.first.wpilibj.DriverStation;
import edu.wpi.first.wpilibj.DriverStation.Alliance;
Expand Down Expand Up @@ -38,31 +39,15 @@ 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();

if (alliance.isPresent()) {
if (alliance.get().equals(Alliance.Blue)) {
tagId = 7;
tagId = VisionConstants.MAIN_BLUE_SPEAKER_TAG;
} else {
tagId = 4;
tagId = VisionConstants.MAIN_RED_SPEAKER_TAG;
}
Robot.lights.signalCameraConnected();
} else {
Expand Down

0 comments on commit 572055d

Please sign in to comment.