Skip to content

Commit 4a96dee

Browse files
committed
Merge branch 'auton' of https://github.com/SaintsRobotics/Reefscape2025 into auton
2 parents 69ed96e + a745d5a commit 4a96dee

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id "java"
3-
id "edu.wpi.first.GradleRIO" version "2025.2.1"
3+
id "edu.wpi.first.GradleRIO" version "2025.3.1"
44
}
55

66
java {

src/main/java/frc/robot/subsystems/DriveSubsystem.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ public void periodic() {
113113
m_poseEstimator.update(Robot.isReal() ? m_gyro.getRotation2d() : new Rotation2d(m_gyroAngle),
114114
m_swerveModulePositions);
115115

116-
if (VisionConstants.kUseVision && Robot.isReal()) {
116+
boolean limelightReal = LimelightHelpers.getLatency_Pipeline(VisionConstants.kLimelightName) != 0.0;
117+
if (VisionConstants.kUseVision && Robot.isReal() && limelightReal) {
117118
// Update LimeLight with current robot orientation
118119
LimelightHelpers.SetRobotOrientation(VisionConstants.kLimelightName, m_poseEstimator.getEstimatedPosition().getRotation().getDegrees(), 0.0, 0.0, 0.0, 0.0, 0.0);
119120

@@ -134,6 +135,7 @@ public void periodic() {
134135
SmartDashboard.putNumber("gyro angle", m_gyro.getAngle());
135136
SmartDashboard.putNumber("odometryX", m_poseEstimator.getEstimatedPosition().getX());
136137
SmartDashboard.putNumber("odometryY", m_poseEstimator.getEstimatedPosition().getY());
138+
SmartDashboard.putBoolean("Limelight isreal", limelightReal);
137139

138140
// AdvantageScope Logging
139141
// max speed = 1 (for ease of use in AdvantageScope)

0 commit comments

Comments
 (0)