From: maxwtan <100314265+MaxwellTTan20@users.noreply.github.com> Date: Fri, 27 Feb 2026 23:28:48 +0000 (-0800) Subject: Merge branch 'week-0-comp' of https://github.com/iron-claw-972/FRC2026 into week... X-Git-Url: https://git.taranathan.com/?a=commitdiff_plain;h=af4a6151ff8f4fb540185c1ec8e97af5696c9ff5;p=FRC2026.git Merge branch 'week-0-comp' of https://github.com/iron-claw-972/FRC2026 into week-0-comp --- af4a6151ff8f4fb540185c1ec8e97af5696c9ff5 diff --cc src/main/java/frc/robot/commands/gpm/Superstructure.java index 72aa526,9567be4..7e55227 --- a/src/main/java/frc/robot/commands/gpm/Superstructure.java +++ b/src/main/java/frc/robot/commands/gpm/Superstructure.java @@@ -120,13 -116,14 +119,16 @@@ 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), target == FieldConstants.getHubTranslation().toTranslation2d() ? - 2.0 : 3.0); - goalState = goalStateWithT.getFirst(); + 2.0 : 5.0); ++ ++ goalState = goalStateWithT.getFirst(); - timeOfFlight = goalStateWithT.getSecond(); + double TOFAdjustment = 0.75; - timeOfFlight = goalState.timeOfFlight() * TOFAdjustment; ++ timeOfFlight = goalStateWithT.getSecond() * TOFAdjustment; double offsetX = turretVelocityX * timeOfFlight; double offsetY = turretVelocityY * timeOfFlight; lookaheadPose = diff --cc src/main/java/frc/robot/controls/PS5ControllerDriverConfig.java index 6041c96,2597c8c..7818fa7 --- a/src/main/java/frc/robot/controls/PS5ControllerDriverConfig.java +++ b/src/main/java/frc/robot/controls/PS5ControllerDriverConfig.java @@@ -16,10 -16,12 +16,13 @@@ import frc.robot.commands.gpm.AutoShoot import frc.robot.commands.gpm.ClimbDriveCommand; import frc.robot.commands.gpm.IntakeMovementCommand; import frc.robot.commands.gpm.ReverseMotors; +import frc.robot.commands.gpm.Superstructure; 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; diff --cc src/main/java/frc/robot/subsystems/turret/Turret.java index e589622,10d26ba..69969eb --- a/src/main/java/frc/robot/subsystems/turret/Turret.java +++ b/src/main/java/frc/robot/subsystems/turret/Turret.java @@@ -120,12 -122,9 +122,13 @@@ public class Turret extends SubsystemBa double motorRotations = turretRot * TurretConstants.GEAR_RATIO; //Sets the initial motor position + inputs.positionDeg = turretRot; motor.setPosition(motorRotations); + //motor.setPosition(Units.degreesToRotations(238.86) * TurretConstants.GEAR_RATIO); + + motor.setPosition(0.0); + SmartDashboard.putData("Turn to 0", new InstantCommand(()->{setFieldRelativeTarget(Rotation2d.fromDegrees(0), 0.0);})); SmartDashboard.putData("Turn to -90", new InstantCommand(()->{setFieldRelativeTarget(Rotation2d.fromDegrees(-90), 0.0);})); SmartDashboard.putData("Turn to 90", new InstantCommand(()->{setFieldRelativeTarget(Rotation2d.fromDegrees(90), 0.0);}));