From 5784d3bd10f5f032e355de70f9226556fe4d0099 Mon Sep 17 00:00:00 2001 From: Hayden Heroux Date: Thu, 16 May 2024 18:10:36 -0400 Subject: [PATCH] fix(shooter): Lower maximum speed and slightly boost kP. --- src/main/java/frc/robot/shooter/Shooter.java | 4 ++-- src/main/java/frc/robot/shooter/ShooterState.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/frc/robot/shooter/Shooter.java b/src/main/java/frc/robot/shooter/Shooter.java index 4210c31..12233e6 100644 --- a/src/main/java/frc/robot/shooter/Shooter.java +++ b/src/main/java/frc/robot/shooter/Shooter.java @@ -24,9 +24,9 @@ public class Shooter extends Subsystem { .motorToMechanismRatio(28.0 / 16.0) .statorCurrentLimit(40.0)) // TODO Test, 40A -> 80A? .motionProfileConfig( - motionProfile -> motionProfile.maximumVelocity(60).maximumAcceleration(200)) + motionProfile -> motionProfile.maximumVelocity(50).maximumAcceleration(200)) .feedforwardControllerConfig(feedforward -> feedforward.kS(0.14).kV(0.2)) - .feedbackControllerConfig(feedback -> feedback.kP(0.14)) + .feedbackControllerConfig(feedback -> feedback.kP(0.4)) .build(); /** Flywheel controller. */ diff --git a/src/main/java/frc/robot/shooter/ShooterState.java b/src/main/java/frc/robot/shooter/ShooterState.java index 5f67235..78c501a 100644 --- a/src/main/java/frc/robot/shooter/ShooterState.java +++ b/src/main/java/frc/robot/shooter/ShooterState.java @@ -20,10 +20,10 @@ public record ShooterState( public static final ShooterState EJECT = new ShooterState(0, -44); /** Subwoofer shooting state. */ - public static final ShooterState SUBWOOFER = new ShooterState(60, 44); + public static final ShooterState SUBWOOFER = new ShooterState(50, 44); /** Skim shooting state. */ - public static final ShooterState SKIM = new ShooterState(60, 44); + public static final ShooterState SKIM = new ShooterState(50, 44); /** Amp shooting state. */ public static final ShooterState AMP = new ShooterState(10, 20);