]> git.taranathan.com Git - FRC2026.git/commitdiff
Update Turret.java
authormixxlto <maxtan0626@gmail.com>
Mon, 19 Jan 2026 06:12:45 +0000 (22:12 -0800)
committermixxlto <maxtan0626@gmail.com>
Mon, 19 Jan 2026 06:12:45 +0000 (22:12 -0800)
src/main/java/frc/robot/subsystems/turret/Turret.java

index be1915a3d38a65adc09980cbe6e53ec1f8fa9e22..332d18f30805afcb08d77ef9226d17d6835a27c1 100644 (file)
@@ -181,7 +181,7 @@ public class Turret extends SubsystemBase {
         Translation2d drivepose = drivetrain.getPose().getTranslation();
         // Using tag #??
         int tagNumber = 17;
-        Translation2d tagpose = FieldConstants.APRIL_TAGS.get(tagNumber - 1).pose.toPose2d().getTranslation();
+        Translation2d tagpose = FieldConstants.field.getTagPose(tagNumber ).get().toPose2d().getTranslation();
         double D_y = tagpose.getY() - drivepose.getY();
         double D_x = tagpose.getX() - drivepose.getX();
         double angleRad = Math.atan2(D_y, D_x);