File tree Expand file tree Collapse file tree
src/main/java/frc/robot/subsystems/drive Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ;
You can’t perform that action at this time.
0 commit comments