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

index 2a7ca77c504e54efc928f3a186857008dc6c2ae9..37d346531eff357f5c9598b09d4b506f97397d03 100644 (file)
@@ -16,12 +16,12 @@ import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
 import edu.wpi.first.wpilibj2.command.Command;
 import frc.robot.constants.Constants;
 import frc.robot.constants.FieldConstants;
+import frc.robot.constants.ShotInterpolation;
 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.constants.ShotInterpolation;
 import frc.robot.subsystems.turret.Turret;
 import frc.robot.subsystems.turret.TurretConstants;
 import frc.robot.util.PhaseManager;
@@ -79,7 +79,8 @@ public class Superstructure extends Command {
     }
 
     public void updateSetpoints(Pose2d drivepose) {
-        Pose2d turretPosition = drivepose.transformBy(new Transform2d((new Translation2d(TurretConstants.DISTANCE_FROM_ROBOT_CENTER.getX(),TurretConstants.DISTANCE_FROM_ROBOT_CENTER.getY())), new Rotation2d()));
+               Pose2d turretPosition = drivepose.transformBy(
+                               new Transform2d(TurretConstants.DISTANCE_FROM_ROBOT_CENTER.toTranslation2d(), Rotation2d.kZero));
         
         // If the robot is moving, adjust the target position based on velocity
         ChassisSpeeds robotRelVel = drivetrain.getChassisSpeeds();
@@ -226,4 +227,4 @@ public class Superstructure extends Command {
         stowEverything();
     }
 
-}
\ No newline at end of file
+}