]> git.taranathan.com Git - FRC2026.git/commitdiff
kousha wanted more changes
authormoo <moogoesmeow123@gmail.com>
Fri, 27 Feb 2026 00:50:29 +0000 (16:50 -0800)
committermoo <moogoesmeow123@gmail.com>
Fri, 27 Feb 2026 00:50:29 +0000 (16:50 -0800)
should work

src/main/java/frc/robot/commands/drive_comm/DefaultDriveCommand.java

index d9af07497f0a3009dc94e4c3f92fc4283f757905..5dbe5027d744be67325de302f807d143040dbf55 100644 (file)
@@ -79,7 +79,7 @@ public class DefaultDriveCommand extends Command {
                 double yawDegrees = swerve.getYaw().getDegrees();
                 double snappedDeg;
 
-                if (swerve.getPose().getX() < FieldConstants.FIELD_LENGTH / 2) {
+                if (swerve.getPose().getX() < swerve.getDesiredPose().getX()) {
                     snappedDeg = (swerve.getYaw().getDegrees() > 135 || swerve.getYaw().getDegrees() < 225) ? 180 : 0;
                 } else {
                     snappedDeg = (swerve.getYaw().getDegrees() < 45 || swerve.getYaw().getDegrees() > 315) ? 0 : 180;