From 835d8779b059805ba2561234f11ef8d99ef8fb8f Mon Sep 17 00:00:00 2001 From: Shikhar Date: Wed, 25 Feb 2026 17:34:24 -0700 Subject: [PATCH] Fix shooter idle speed. --- .../robot/constants/BuildConstants.java | 10 +++---- .../robot/subsystems/shooter/Shooter.java | 6 ++-- .../subsystems/shooter/ShooterConstants.java | 4 +-- .../robot/subsystems/shooter/ShooterIO.java | 6 ++-- .../robot/subsystems/shooter/ShooterReal.java | 30 +++++++++---------- 5 files changed, 28 insertions(+), 28 deletions(-) diff --git a/src/main/java/frc4388/robot/constants/BuildConstants.java b/src/main/java/frc4388/robot/constants/BuildConstants.java index aa439ce..8d8246e 100644 --- a/src/main/java/frc4388/robot/constants/BuildConstants.java +++ b/src/main/java/frc4388/robot/constants/BuildConstants.java @@ -7,12 +7,12 @@ public final class BuildConstants { public static final String MAVEN_GROUP = ""; public static final String MAVEN_NAME = "2026KPopRobotHunters"; public static final String VERSION = "unspecified"; - public static final int GIT_REVISION = 84; - public static final String GIT_SHA = "a09a039cb8a5bef1ee897d3307355d975eefd232"; - public static final String GIT_DATE = "2026-02-24 16:46:17 MST"; + public static final int GIT_REVISION = 85; + public static final String GIT_SHA = "3197a3dce03bf34c001ef4009de3e7d98a181536"; + public static final String GIT_DATE = "2026-02-24 22:17:58 MST"; public static final String GIT_BRANCH = "reveal-night"; - public static final String BUILD_DATE = "2026-02-24 18:42:57 MST"; - public static final long BUILD_UNIX_TIME = 1771983777848L; + public static final String BUILD_DATE = "2026-02-25 16:32:13 MST"; + public static final long BUILD_UNIX_TIME = 1772062333884L; public static final int DIRTY = 1; private BuildConstants(){} diff --git a/src/main/java/frc4388/robot/subsystems/shooter/Shooter.java b/src/main/java/frc4388/robot/subsystems/shooter/Shooter.java index 4ea2aaa..a580a84 100644 --- a/src/main/java/frc4388/robot/subsystems/shooter/Shooter.java +++ b/src/main/java/frc4388/robot/subsystems/shooter/Shooter.java @@ -217,9 +217,9 @@ public class Shooter extends SubsystemBase { io.setShooterCurrentLimitSpeed( state, - ShooterConstants.SHOOTER_IDLE_PERCENT_OUTPUT.get(), - Amps.of(ShooterConstants.SHOOTER_IDLE_MAX_CURRENT.get()), - RotationsPerSecond.of(ShooterConstants.INDEXER_REVERSE_OUTPUT.get()) + ShooterConstants.SHOOTER_IDLE_PERCENT_OUTPUT.get() + // Amps.of(ShooterConstants.SHOOTER_IDLE_MAX_CURRENT.get()), + // RotationsPerSecond.of(ShooterConstants.INDEXER_REVERSE_OUTPUT.get()) ); io.setIndexerOutput(state, ShooterConstants.INDEXER_REVERSE_OUTPUT.get()); m_robotLED.setMode(Constants.LEDConstants.DEFAULT_PATTERN); diff --git a/src/main/java/frc4388/robot/subsystems/shooter/ShooterConstants.java b/src/main/java/frc4388/robot/subsystems/shooter/ShooterConstants.java index 89b3cb7..c504b1d 100644 --- a/src/main/java/frc4388/robot/subsystems/shooter/ShooterConstants.java +++ b/src/main/java/frc4388/robot/subsystems/shooter/ShooterConstants.java @@ -23,8 +23,8 @@ public class ShooterConstants { // public static final ConfigurableDouble SHOOTER_RESTING_VELOCITY = new ConfigurableDouble("Shooter Resting Velocity", 0.0); public static final ConfigurableDouble SHOOTER_IDLE_PERCENT_OUTPUT = new ConfigurableDouble("Shooter idle % output", 0.3); - public static final ConfigurableDouble SHOOTER_IDLE_TARGET_VEL = new ConfigurableDouble("Shooter idle target velocity", 20.); - public static final ConfigurableDouble SHOOTER_IDLE_MAX_CURRENT = new ConfigurableDouble("Shooter Idle max current", 10); + // public static final ConfigurableDouble SHOOTER_IDLE_TARGET_VEL = new ConfigurableDouble("Shooter idle target velocity", 20.); + // public static final ConfigurableDouble SHOOTER_IDLE_MAX_CURRENT = new ConfigurableDouble("Shooter Idle max current", 10); public static final ConfigurableDouble INDEXER_FORWARD_OUTPUT = new ConfigurableDouble("Indexer FWD % Output", -0.4); public static final ConfigurableDouble INDEXER_REVERSE_OUTPUT = new ConfigurableDouble("Indexer reverse % Output", 0.0); diff --git a/src/main/java/frc4388/robot/subsystems/shooter/ShooterIO.java b/src/main/java/frc4388/robot/subsystems/shooter/ShooterIO.java index 4fd3916..c7d3369 100644 --- a/src/main/java/frc4388/robot/subsystems/shooter/ShooterIO.java +++ b/src/main/java/frc4388/robot/subsystems/shooter/ShooterIO.java @@ -40,9 +40,9 @@ public interface ShooterIO { public default void setShooterVelocity(ShooterState state, AngularVelocity angularVelocity) {} public default void setShooterCurrentLimitSpeed( ShooterState state, - double percentOutput, - Current currentLimit, - AngularVelocity targetVelocity + double percentOutput + // Current currentLimit, + // AngularVelocity targetVelocity ) {} // public default void setMotor2Velocity(ShooterState state, AngularVelocity angularVelocity) {} public default void setIndexerOutput(ShooterState state, double percentOutput) {} diff --git a/src/main/java/frc4388/robot/subsystems/shooter/ShooterReal.java b/src/main/java/frc4388/robot/subsystems/shooter/ShooterReal.java index 6b14722..9a71787 100644 --- a/src/main/java/frc4388/robot/subsystems/shooter/ShooterReal.java +++ b/src/main/java/frc4388/robot/subsystems/shooter/ShooterReal.java @@ -61,26 +61,26 @@ public class ShooterReal implements ShooterIO { @Override public void setShooterCurrentLimitSpeed( ShooterState state, - double percentOutput, - Current currentLimit, - AngularVelocity targetVelocity + double percentOutput + // Current currentLimit, + // AngularVelocity targetVelocity ) { - state.motor1TargetVelocity = targetVelocity; - state.motor2TargetVelocity = targetVelocity; + // state.motor1TargetVelocity = targetVelocity; + // state.motor2TargetVelocity = targetVelocity; - double current = Math.abs(state.motor1Current.in(Amps)) + Math.abs(state.motor2Current.in(Amps)); - double velocity = (Math.abs(state.motor1Velocity.in(RotationsPerSecond)) + Math.abs(state.motor2Velocity.in(RotationsPerSecond))) / 2; + // double current = Math.abs(state.motor1Current.in(Amps)) + Math.abs(state.motor2Current.in(Amps)); + // double velocity = (Math.abs(state.motor1Velocity.in(RotationsPerSecond)) + Math.abs(state.motor2Velocity.in(RotationsPerSecond))) / 2; - if( - Math.abs(currentLimit.in(Amps)) > current && - Math.abs(targetVelocity.in(RotationsPerSecond)) > velocity - ) { + // if( + // Math.abs(currentLimit.in(Amps)) > current && + // Math.abs(targetVelocity.in(RotationsPerSecond)) > velocity + // ) { m_shooter1Motor.set(percentOutput); m_shooter2Motor.set(percentOutput); - } else { - m_shooter1Motor.set(0); - m_shooter2Motor.set(0); - } + // } else { + // m_shooter1Motor.set(0); + // m_shooter2Motor.set(0); + // } } @Override