From: iefomit Date: Sat, 28 Mar 2026 16:44:11 +0000 (-0700) Subject: builds X-Git-Url: https://git.taranathan.com/?a=commitdiff_plain;h=a19df0070595ae915dc3804285607c08f105e462;p=FRC2026.git builds --- 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