From f4a42f02eed0fa3b0950a05da55174b9f4b89ce7 Mon Sep 17 00:00:00 2001 From: mimigamin Date: Sat, 14 Mar 2026 20:39:45 -0600 Subject: [PATCH] Update StayInPosition.java --- .../java/frc4388/robot/commands/Swerve/StayInPosition.java | 5 ++++- .../java/frc4388/robot/subsystems/shooter/ShooterIO.java | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/frc4388/robot/commands/Swerve/StayInPosition.java b/src/main/java/frc4388/robot/commands/Swerve/StayInPosition.java index b43c576..afbfaa3 100644 --- a/src/main/java/frc4388/robot/commands/Swerve/StayInPosition.java +++ b/src/main/java/frc4388/robot/commands/Swerve/StayInPosition.java @@ -27,15 +27,18 @@ public class StayInPosition extends PID { double translationX = targetPose.getX() - currentPose.getX(); double translationY = targetPose.getY() - currentPose.getY(); if (translationX > 0.2){ + //If below is changed make this change too so it never goes over 1 translationX = 0.2; } if (translationY > 0.2){ + //Same here translationY = 0.2; } if (Math.abs(translationX) < 0.01 && Math.abs(translationY) < 0.01) { driveTranslation = new Translation2d(); } else { - driveTranslation = new Translation2d(translationX * 4.5, translationY * 4.5); + //TODO: Tweak for best corrector against another bot + driveTranslation = new Translation2d(translationX * 4.5, translationY * 4.5); } drive.driveFieldAngleSIP(driveTranslation, targetPose.getRotation()); diff --git a/src/main/java/frc4388/robot/subsystems/shooter/ShooterIO.java b/src/main/java/frc4388/robot/subsystems/shooter/ShooterIO.java index 6be6431..4424848 100644 --- a/src/main/java/frc4388/robot/subsystems/shooter/ShooterIO.java +++ b/src/main/java/frc4388/robot/subsystems/shooter/ShooterIO.java @@ -19,14 +19,14 @@ public interface ShooterIO { // Angle shooterTargetPitch = Rotations.of(0); // Current pitchMotorCurrent = Amps.of(0); - AngularVelocity motor1TargetVelocity = RotationsPerSecond.of(0); + AngularVelocity motor1TargetVelocity = RotationsPerSecond.of(40); // For modeling purposes AngularVelocity motor2TargetVelocity = RotationsPerSecond.of(0); double indexerTargetOutput = 0; AngularVelocity motor1Velocity = RotationsPerSecond.of(0); AngularVelocity motor2Velocity = RotationsPerSecond.of(0); - AngularVelocity indexerForwardVelocity = RotationsPerSecond.of(42.53); //guestimate + AngularVelocity indexerForwardVelocity = RotationsPerSecond.of(0); double indexerOutput = 0; Current motor1Current = Amps.of(0);