]> git.taranathan.com Git - FRC2026.git/commitdiff
fda
authormaxwtan <100314265+MaxwellTTan20@users.noreply.github.com>
Sat, 24 Jan 2026 23:51:38 +0000 (15:51 -0800)
committermaxwtan <100314265+MaxwellTTan20@users.noreply.github.com>
Sat, 24 Jan 2026 23:51:38 +0000 (15:51 -0800)
src/main/java/frc/robot/commands/gpm/TurretAutoShoot.java
src/main/java/frc/robot/subsystems/turret/Turret.java

index 04b987f016e84f8b6d129e66f091d1bf8dda6d3a..b437dc9b2d7135397027e9f3a9b1731ef1f41576 100644 (file)
@@ -38,7 +38,7 @@ public class TurretAutoShoot extends Command {
     }
 
     public TurretAutoShoot(Turret turret, Drivetrain drivetrain, boolean SOTM){
-        this(turret, drivetrain, null);
+        this(turret, drivetrain, null, SOTM);
         this.SOTM = SOTM;
     }
 
@@ -52,8 +52,8 @@ public class TurretAutoShoot extends Command {
             double xVel = chassisSpeed.vxMetersPerSecond;
             double yVel = chassisSpeed.vyMetersPerSecond;
             
-            D_y = target.getY() - drivepose.getY() + (Units.secondsToMilliseconds(yVel) * 20); // every periodic predict where the robot will be in one periodic into the future
-            D_x = target.getX() - drivepose.getX() + (Units.secondsToMilliseconds(xVel) * 20);
+            D_y = target.getY() - drivepose.getY() + (0.92) * yVel;
+            D_x = target.getX() - drivepose.getX() + (0.92) * xVel;
         } else {
             D_y = target.getY() - drivepose.getY();
             D_x = target.getX() - drivepose.getX();
index 1faf7e341ccd0e4eda3216cb812a1eb3a691e7f3..ecbde7f7c7ea19715900475ec07551a671893cff 100644 (file)
@@ -48,8 +48,8 @@ public class Turret extends SubsystemBase implements TurretIO{
 
     private TurretIOInputsAutoLogged inputs = new TurretIOInputsAutoLogged();
 
-    private double dV = 2.0;
-    private double kP = 10.0;
+    private double dV = 1.0;
+    private double kP = 15.0;
     private double kI = 0.0;
     private double kD = 0.0;