]> git.taranathan.com Git - FRC2026.git/commitdiff
shuttling works
authormaxwtan <100314265+MaxwellTTan20@users.noreply.github.com>
Mon, 6 Apr 2026 19:06:54 +0000 (12:06 -0700)
committermaxwtan <100314265+MaxwellTTan20@users.noreply.github.com>
Mon, 6 Apr 2026 19:06:54 +0000 (12:06 -0700)
src/main/java/frc/robot/util/PhaseManager.java

index 27a085e27eab20dec4eb7030b86f35221795ea54..6f98d6478f9177f3f2e978eef476b0865204116d 100644 (file)
@@ -1,5 +1,7 @@
 package frc.robot.util;
 
+import org.littletonrobotics.junction.Logger;
+
 import edu.wpi.first.math.geometry.Pose2d;
 import edu.wpi.first.math.geometry.Translation2d;
 import frc.robot.constants.FieldConstants;
@@ -76,6 +78,7 @@ public class PhaseManager {
     }
     
     public boolean isIdle() { 
+
         return wantedState == WantedState.IDLE; 
     }
     
@@ -94,10 +97,11 @@ public class PhaseManager {
             return FieldConstants.getHubTranslation().toTranslation2d();
         } else  {
             double targetY;
+
             if (drivePose.getY() > 4.0) {
-                targetY = FieldConstants.FIELD_WIDTH * 1.5 - drivePose.getY();
-            } {
-                targetY = FieldConstants.FIELD_WIDTH * 0.5 - drivePose.getY();
+                targetY = (FieldConstants.FIELD_WIDTH * 1.5) - drivePose.getY();
+            } else {
+                targetY = (FieldConstants.FIELD_WIDTH * 0.5) - drivePose.getY();
             }
             return new Translation2d(FieldConstants.getAllianceSideTranslation(true).getX(), targetY);
         }