From 6e5bb74bf0b2928b395604fba005d4869d9fac13 Mon Sep 17 00:00:00 2001 From: Shikhar Date: Mon, 16 Feb 2026 17:35:41 -0700 Subject: [PATCH] incorporating indexer waiting for shooter speed --- src/main/java/frc4388/robot/subsystems/shooter/Shooter.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/frc4388/robot/subsystems/shooter/Shooter.java b/src/main/java/frc4388/robot/subsystems/shooter/Shooter.java index 5551815..0b274f6 100644 --- a/src/main/java/frc4388/robot/subsystems/shooter/Shooter.java +++ b/src/main/java/frc4388/robot/subsystems/shooter/Shooter.java @@ -152,7 +152,11 @@ public class Shooter extends SubsystemBase { switch (mode) { case Shooting: io.setShooterVelocity(state, RotationsPerSecond.of(ShooterConstants.SHOOTER_ACTIVE_VELOCITY.get())); - io.setIndexerVelocity(state, RotationsPerSecond.of(ShooterConstants.INDEXER_FORWARD_VELOCITY.get())); + if(state.motor1Velocity.in(RotationsPerSecond) > 30){ + io.setIndexerVelocity(state, RotationsPerSecond.of(ShooterConstants.INDEXER_FORWARD_VELOCITY.get())); + }else{ + io.setIndexerVelocity(state, RotationsPerSecond.of(ShooterConstants.INDEXER_REVERSE_VELOCITY.get())); + } break; case Ready: io.setShooterVelocity(state, RotationsPerSecond.of(ShooterConstants.SHOOTER_ACTIVE_VELOCITY.get()));