From 75428538f9dd06f34d0703cc7a7a0602246dff42 Mon Sep 17 00:00:00 2001 From: Arnav495 Date: Tue, 24 Feb 2026 15:59:31 -0800 Subject: [PATCH] Make code build. --- src/main/java/frc/robot/commands/gpm/Superstructure.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/frc/robot/commands/gpm/Superstructure.java b/src/main/java/frc/robot/commands/gpm/Superstructure.java index 37d3465..9dc27f1 100644 --- a/src/main/java/frc/robot/commands/gpm/Superstructure.java +++ b/src/main/java/frc/robot/commands/gpm/Superstructure.java @@ -72,6 +72,7 @@ public class Superstructure extends Command { drivepose = drivetrain.getPose(); goalState = ShooterPhysics.getShotParams( + Translation2d.kZero, FieldConstants.getHubTranslation().minus(new Translation3d(drivepose.getTranslation())), 8.0); // Random initial goalState to prevent it being null @@ -114,11 +115,13 @@ public class Superstructure extends Command { target == FieldConstants.getHubTranslation().toTranslation2d() ? FieldConstants.getHubTranslation().getZ() : 0.0); // Height of 0 if it's not the hub - goalState = ShooterPhysics.getShotParams( + var goalStateWithT = ShooterPhysics.getShotParamsWithT( + Translation2d.kZero, target3d.minus(lookahead3d), 2.0); + goalState = goalStateWithT.getFirst(); - timeOfFlight = goalState.timeOfFlight(); + timeOfFlight = goalStateWithT.getSecond(); double offsetX = turretVelocityX * timeOfFlight; double offsetY = turretVelocityY * timeOfFlight; lookaheadPose = -- 2.39.5