From: Arnav495 Date: Tue, 24 Feb 2026 23:22:02 +0000 (-0800) Subject: Make code cleaner. X-Git-Url: https://git.taranathan.com/?a=commitdiff_plain;h=6711468f9b0e0480374ceec1dbd1b7ad608bb207;p=FRC2026.git Make code cleaner. --- diff --git a/src/main/java/frc/robot/commands/gpm/Superstructure.java b/src/main/java/frc/robot/commands/gpm/Superstructure.java index 2a7ca77..37d3465 100644 --- a/src/main/java/frc/robot/commands/gpm/Superstructure.java +++ b/src/main/java/frc/robot/commands/gpm/Superstructure.java @@ -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 +}