]> git.taranathan.com Git - FRC2026.git/commitdiff
Merge branch 'week-0-comp' of https://github.com/iron-claw-972/FRC2026 into week...
authormaxwtan <100314265+MaxwellTTan20@users.noreply.github.com>
Fri, 27 Feb 2026 23:28:48 +0000 (15:28 -0800)
committermaxwtan <100314265+MaxwellTTan20@users.noreply.github.com>
Fri, 27 Feb 2026 23:28:48 +0000 (15:28 -0800)
1  2 
src/main/java/frc/robot/commands/gpm/Superstructure.java
src/main/java/frc/robot/controls/PS5ControllerDriverConfig.java
src/main/java/frc/robot/subsystems/turret/Turret.java

index 72aa526166a981ce841286115e1c2de7b012c4da,9567be4e680750e073ca47c8f233181e308a6e8e..7e55227588da0c2f2fc1109fa01c8edc2d5db85a
@@@ -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 =
index 6041c96653712cfa0606aec100e49f00f7353986,2597c8c11edc2dcef6a0828559f7dc7989f48c0f..7818fa76399f103b7750298f99b37eda04bb1344
@@@ -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;
index e5896220ce86c6d563e44ecec9ab3913ef5feb71,10d26bac546cdf133a77bc84b2921078c069e78a..69969eb13be5c97a3de0587015d4230c3c6e9058
@@@ -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);}));