]> git.taranathan.com Git - FRC2026.git/commitdiff
Make code build.
authorArnav495 <arnieincyberland@gmail.com>
Tue, 24 Feb 2026 23:59:31 +0000 (15:59 -0800)
committerArnav495 <arnieincyberland@gmail.com>
Tue, 24 Feb 2026 23:59:31 +0000 (15:59 -0800)
src/main/java/frc/robot/commands/gpm/Superstructure.java

index 37d346531eff357f5c9598b09d4b506f97397d03..9dc27f12a9e74394e4f3a8ae74d25a56f5ea0724 100644 (file)
@@ -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 =