From: iefomit Date: Mon, 16 Feb 2026 18:21:15 +0000 (-0800) Subject: improve initialization X-Git-Url: https://git.taranathan.com/?a=commitdiff_plain;h=59921911ffc1a7b5eaf3c0c18f92d6cf35bda7d2;p=FRC2026.git improve initialization --- diff --git a/src/main/java/frc/robot/commands/gpm/TurretAutoShoot.java b/src/main/java/frc/robot/commands/gpm/TurretAutoShoot.java index 9083b86..9a72985 100644 --- a/src/main/java/frc/robot/commands/gpm/TurretAutoShoot.java +++ b/src/main/java/frc/robot/commands/gpm/TurretAutoShoot.java @@ -27,7 +27,7 @@ public class TurretAutoShoot extends Command { private double turretSetpoint; - private Pose2d drivepose; + private Pose2d drivepose = new Pose2d(); private final LinearFilter turretAngleFilter = LinearFilter.movingAverage((int) (0.1 / Constants.LOOP_TIME)); private Rotation2d lastTurretAngle; @@ -38,7 +38,6 @@ public class TurretAutoShoot extends Command { public TurretAutoShoot(Turret turret, Drivetrain drivetrain) { this.turret = turret; this.drivetrain = drivetrain; - drivepose = new Pose2d(drivepose.getTranslation(), drivepose.getRotation().plus(new Rotation2d(Math.PI))); addRequirements(turret); }