Skip to content

Commit d760ea3

Browse files
committed
mt2
1 parent b7d02cb commit d760ea3

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

  • src/main/java/frc/robot/subsystems/drive

src/main/java/frc/robot/subsystems/drive/Drive.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -241,10 +241,11 @@ public void periodic() {
241241
0,
242242
0,
243243
0);
244-
if (DriverStation.getAlliance().isPresent() && visionInputs.aTV) {
245-
// mt2TagFiltering();
246-
visionLogic();
247-
}
244+
if (visionInputs.tagCount > 1 || DriverStation.isDisabled()) {
245+
visionLogic();
246+
} else {
247+
mt2TagFiltering();
248+
}
248249

249250
Logger.recordOutput("note time", getCachedNoteTime());
250251
// Note Pose estimating
@@ -340,7 +341,7 @@ public void visionLogic() {
340341
double yMeterStds;
341342
double headingDegStds;
342343

343-
double poseDifference = getVisionPoseDifference(limelightMeasurement.pose);
344+
// double poseDifference = getVisionPoseDifference(limelightMeasurement.pose);
344345

345346
boolean isFlipped =
346347
DriverStation.getAlliance().isPresent()
@@ -352,11 +353,11 @@ public void visionLogic() {
352353
xMeterStds = 0.7;
353354
yMeterStds = 0.7;
354355
headingDegStds = 8;
355-
} else if (limelightMeasurement.tagCount == 1 && poseDifference < 0.5) {
356+
} else if (limelightMeasurement.tagCount == 1) { // && poseDifference < 0.5
356357
xMeterStds = 5;
357358
yMeterStds = 5;
358359
headingDegStds = 30;
359-
} else if (limelightMeasurement.tagCount == 1 && poseDifference < 3) {
360+
} else if (limelightMeasurement.tagCount == 1) { // && poseDifference < 3
360361
xMeterStds = 11.43;
361362
yMeterStds = 11.43;
362363
headingDegStds = 9999;

0 commit comments

Comments
 (0)