From: Arnav495 Date: Fri, 27 Feb 2026 22:39:42 +0000 (-0800) Subject: Merge branch 'shooter-calcs' into week-0-comp X-Git-Url: https://git.taranathan.com/?a=commitdiff_plain;h=0bf004eede1b0c9badb77b83be8c2984485a694f;p=FRC2026.git Merge branch 'shooter-calcs' into week-0-comp --- 0bf004eede1b0c9badb77b83be8c2984485a694f diff --cc src/main/java/frc/robot/commands/gpm/Superstructure.java index dfb0ba9,9dc27f1..9567be4 --- a/src/main/java/frc/robot/commands/gpm/Superstructure.java +++ b/src/main/java/frc/robot/commands/gpm/Superstructure.java @@@ -27,8 -25,7 +25,8 @@@ import frc.robot.subsystems.spindexer.S import frc.robot.subsystems.turret.Turret; import frc.robot.subsystems.turret.TurretConstants; import frc.robot.util.PhaseManager; - import frc.robot.util.ShooterPhysics; +import frc.robot.util.PhaseManager.CurrentState; + import frc.robot.util.ShooterPhysics; import frc.robot.util.ShooterPhysics.Constraints; import frc.robot.util.ShooterPhysics.TurretState; @@@ -117,12 -115,13 +116,14 @@@ public class Superstructure extends Com 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); + target == FieldConstants.getHubTranslation().toTranslation2d() ? + 2.0 : 3.0); + goalState = goalStateWithT.getFirst(); - timeOfFlight = goalState.timeOfFlight(); + timeOfFlight = goalStateWithT.getSecond(); double offsetX = turretVelocityX * timeOfFlight; double offsetY = turretVelocityY * timeOfFlight; lookaheadPose = diff --cc src/main/java/frc/robot/controls/PS5ControllerDriverConfig.java index dd5e171,419f0f9..2597c8c --- a/src/main/java/frc/robot/controls/PS5ControllerDriverConfig.java +++ b/src/main/java/frc/robot/controls/PS5ControllerDriverConfig.java @@@ -18,7 -16,9 +18,10 @@@ import frc.robot.commands.gpm.IntakeMov import frc.robot.commands.gpm.ReverseMotors; import frc.robot.constants.Constants; import frc.robot.subsystems.Climb.LinearClimb; + import frc.robot.subsystems.Intake.Intake; import frc.robot.subsystems.drivetrain.Drivetrain; + import frc.robot.subsystems.hood.Hood; ++import frc.robot.subsystems.hood.HoodConstants; import frc.robot.subsystems.shooter.Shooter; import frc.robot.subsystems.spindexer.Spindexer; import frc.robot.subsystems.turret.Turret;