From: iefomit Date: Mon, 16 Feb 2026 19:21:58 +0000 (-0800) Subject: small fix X-Git-Url: https://git.taranathan.com/?a=commitdiff_plain;h=feaed5a5eed18fc5af996619959d132d4057e846;p=FRC2026.git small fix --- diff --git a/src/main/java/frc/robot/subsystems/turret/Turret.java b/src/main/java/frc/robot/subsystems/turret/Turret.java index 23b929f..bcb0612 100644 --- a/src/main/java/frc/robot/subsystems/turret/Turret.java +++ b/src/main/java/frc/robot/subsystems/turret/Turret.java @@ -191,9 +191,8 @@ public class Turret extends SubsystemBase implements TurretIO{ lastGoalRad = best; - if(Math.abs(best - lastGoalRad) < Math.PI/2){ - best = setpointFilter.calculate(best); - } + // always apply filter to smooth setpoint + best = setpointFilter.calculate(best); // Tells the Kraken to get to this position using 1000Hz profile double motorGoalRotations = Units.radiansToRotations(best) * GEAR_RATIO; @@ -221,7 +220,7 @@ public class Turret extends SubsystemBase implements TurretIO{ .withPosition(motorGoalRotations) .withFeedForward(robotTurnCompensation)); - Logger.recordOutput("Turret/FilteredSetpoint", Units.radiansToDegrees(filteredSetpoint)); + Logger.recordOutput("Turret/FilteredSetpoint", Units.radiansToDegrees(best)); lastFrameVelocity = Units.rotationsToRadians(motor.getVelocity().getValueAsDouble());