From 5a7e693a974fe400593926a73f02fca5f1d7fe19 Mon Sep 17 00:00:00 2001 From: scootdboot Date: Thu, 17 Apr 2025 11:48:03 -0500 Subject: [PATCH] stop moving auto align after entering tolerances this could be added to legacy auto align if we have this problem in auton but i would not like to screw with auton considering it just hit the 3.5 --- src/main/java/frc/robot/autoalign/MovingAutoAlign.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/frc/robot/autoalign/MovingAutoAlign.java b/src/main/java/frc/robot/autoalign/MovingAutoAlign.java index c2617a6..8e83259 100644 --- a/src/main/java/frc/robot/autoalign/MovingAutoAlign.java +++ b/src/main/java/frc/robot/autoalign/MovingAutoAlign.java @@ -81,7 +81,8 @@ public static Command moveToPoseUntilInTolerances( Supplier speedsModifier, Supplier xyConstraints) { return moveToPose(swerve, target, speedsModifier, xyConstraints) - .until(() -> AutoAlignUtils.isInTolerance(swerve.getState().Pose, target.get(), swerve.getState().Speeds)); + .until(() -> AutoAlignUtils.isInTolerance(swerve.getState().Pose, target.get())) + .andThen(swerve.stopCmd()); } /**