]> git.taranathan.com Git - FRC2026.git/commitdiff
use underTrench() instead
authoriefomit <timofei.stem@gmail.com>
Sun, 22 Mar 2026 02:58:31 +0000 (19:58 -0700)
committeriefomit <timofei.stem@gmail.com>
Sun, 22 Mar 2026 02:58:31 +0000 (19:58 -0700)
src/main/java/frc/robot/commands/gpm/Superstructure.java

index 9d10b479c85a006ffbb6602fc83e84b9a6b13f67..ce016372131404c5030f54212a9689b8f33adbef 100644 (file)
@@ -17,7 +17,6 @@ import edu.wpi.first.wpilibj2.command.Command;
 import frc.robot.constants.Constants;
 import frc.robot.constants.FieldConstants;
 import frc.robot.constants.ShotInterpolation;
-import frc.robot.constants.FieldConstants.FieldZone;
 import frc.robot.subsystems.drivetrain.Drivetrain;
 import frc.robot.subsystems.hood.Hood;
 import frc.robot.subsystems.hood.HoodConstants;
@@ -228,8 +227,7 @@ public class Superstructure extends Command {
             // }
 
             hood.setFieldRelativeTarget(Rotation2d.fromDegrees(ShotInterpolation.newHoodMap.get(distanceFromTarget)), hoodVelocity);
-            Translation2d trans2d = new Translation2d(drivepose.getX(), drivepose.getY());
-            if (FieldConstants.getZone(trans2d) == FieldZone.TRENCH_BUMP) {
+            if (FieldConstants.underTrench(drivepose.getX(), drivepose.getY())) {
                 hood.forceHoodDown(true);
             } else {
                 hood.forceHoodDown(false);