Skip to content

Commit

Permalink
fix: stop showing gyro disconnect alert in sim
Browse files Browse the repository at this point in the history
  • Loading branch information
mimizh2418 committed May 21, 2024
1 parent f52af3b commit f64ab33
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import edu.wpi.first.wpilibj2.command.SubsystemBase;
import org.littletonrobotics.junction.AutoLogOutput;
import org.littletonrobotics.junction.Logger;
import org.team1540.robot2024.Robot;
import org.team1540.robot2024.util.Alert;
import org.team1540.robot2024.util.auto.LocalADStarAK;
import org.team1540.robot2024.Constants;
Expand Down Expand Up @@ -195,7 +196,7 @@ public void periodic() {
poseEstimator.update(rawGyroRotation, getModulePositions());
visionPoseEstimator.update(rawGyroRotation, getModulePositions());

gyroDisconnected.set(!gyroInputs.connected);
gyroDisconnected.set(!gyroInputs.connected && Robot.isReal());
}

/**
Expand Down

0 comments on commit f64ab33

Please sign in to comment.