From a19df0070595ae915dc3804285607c08f105e462 Mon Sep 17 00:00:00 2001 From: iefomit Date: Sat, 28 Mar 2026 09:44:11 -0700 Subject: [PATCH] builds --- src/main/java/frc/robot/commands/gpm/Superstructure.java | 2 +- src/main/java/frc/robot/subsystems/spindexer/Spindexer.java | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/frc/robot/commands/gpm/Superstructure.java b/src/main/java/frc/robot/commands/gpm/Superstructure.java index de8b6e9..1c47ac0 100644 --- a/src/main/java/frc/robot/commands/gpm/Superstructure.java +++ b/src/main/java/frc/robot/commands/gpm/Superstructure.java @@ -221,7 +221,7 @@ public class Superstructure extends Command { } else { turret.setFieldRelativeTarget(Rotation2d.fromDegrees(turretSetpoint), turretVelocity - drivetrain.getAngularRate(2)); - boolean shuttling = target.getZ() != FieldConstants.getHubTranslation().getZ(); // if we're aiming upward we are aiming at hub, thus not shuttling + boolean shuttling = target != FieldConstants.getHubTranslation().toTranslation2d(); // if we're aiming at the hub, we're not shuttling // shuttling will move the hood so its angles very close to max (less arch) if (shuttling) { diff --git a/src/main/java/frc/robot/subsystems/spindexer/Spindexer.java b/src/main/java/frc/robot/subsystems/spindexer/Spindexer.java index 4af68f9..79155d9 100644 --- a/src/main/java/frc/robot/subsystems/spindexer/Spindexer.java +++ b/src/main/java/frc/robot/subsystems/spindexer/Spindexer.java @@ -18,6 +18,7 @@ public class Spindexer extends SubsystemBase implements SpindexerIO { public int ballCount = 0; private boolean wasSpindexerSlow = false; private SpindexerState state = SpindexerState.STOPPED; + private boolean reversing = false; private SpindexerIOInputsAutoLogged inputs = new SpindexerIOInputsAutoLogged(); public Spindexer() { updateInputs(); @@ -49,12 +50,16 @@ public class Spindexer extends SubsystemBase implements SpindexerIO { if (state == SpindexerState.MAX) { motor.set(SpindexerConstants.spindexerMaxPower); + reversing = false; } else if (state == SpindexerState.REVERSE) { motor.set(SpindexerConstants.spindexerReversePower); + reversing = true; } else if (state == SpindexerState.STOPPED) { motor.set(0.0); + reversing = false; } else { motor.set(power); + reversing = false; } // scale threshold based on power -- 2.39.5