File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
src/main/java/frc/robot/subsystems/vision Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -56,14 +56,22 @@ public Vision(VisionConsumer consumer, VisionIO... io) {
5656 * @param cameraIndex The index of the camera to use.
5757 */
5858 public Rotation2d getTargetX (int cameraIndex ) {
59- for (int i : inputs [0 ].tagIds ) {
59+ DriverStation .reportWarning (Double .toString (inputs [cameraIndex ].latestTargetObservation .tx ().getDegrees ()), false );
60+ return inputs [cameraIndex ].latestTargetObservation .tx ();
61+
62+ /**for (int i : inputs[0].tagIds) {
6063 DriverStation.reportWarning(Integer.toString(i), false);
6164 var tagPose = aprilTagLayout.getTagPose(i);
65+ DriverStation.reportWarning(
66+ Double.toString(
67+ tagPose.get().getRotation().toRotation2d().plus(Rotation2d.kPi).getDegrees()),
68+ false);
6269 if (i == cameraIndex) {
6370 return tagPose.get().getRotation().toRotation2d().plus(Rotation2d.kPi);
6471 }
6572 }
6673 return Rotation2d.kZero;
74+ */
6775 }
6876
6977 @ Override
You can’t perform that action at this time.
0 commit comments