From 04e6e13694359642f7cf1b023bf2fd66660ce4be Mon Sep 17 00:00:00 2001 From: TheRealGrayden Date: Sat, 11 Apr 2026 10:24:08 -0400 Subject: [PATCH] Im dumb and dont know how to code --- src/main/java/frc/robot/Constants.java | 8 ++++---- src/main/java/frc/robot/commands/ZoneCheck.java | 16 ++++------------ 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/src/main/java/frc/robot/Constants.java b/src/main/java/frc/robot/Constants.java index 4fdb60e..f720c0d 100644 --- a/src/main/java/frc/robot/Constants.java +++ b/src/main/java/frc/robot/Constants.java @@ -45,9 +45,9 @@ public final class Constants { public static final String FRONT_CAMERA_NAME = "limelight-front"; public static final int FRONT_LOCALIZATION_PIPELINE_NUMBER = 0; - public static final double[] BLUE_ZONE_COOR = new double[]{1}; - public static final double[] RED_ZONE_COOR = new double[]{1}; - public static final double[] NEUTRAL_ZONE_COOR = new double[]{1}; + public static final double[] BLUE_ZONE_COOR = new double[]{.04}; + public static final double[] RED_ZONE_COOR = new double[]{12}; + public static final double[] NEUTRAL_ZONE_COOR = new double[]{4.5}; } public static class AdvantageKitConstants { @@ -143,7 +143,7 @@ public final class Constants { public static final double DEFLECTOR_STORED_ANGLE = 0; public static final double DEFLECTOR_SET_ANGLE1 = 100; public static final double DEFLECTOR_SET_ANGLE2 = 200; - public static final double DEFLECTOR_SET_ANGLE3 = 200; // Return to 300 once hood is fixed + public static final double DEFLECTOR_SET_ANGLE3 = 300; // Return to 300 once hood is fixed public static final double DEFLECTOR_SERVO_RATIO = 1.0; } diff --git a/src/main/java/frc/robot/commands/ZoneCheck.java b/src/main/java/frc/robot/commands/ZoneCheck.java index 62f5359..2a46f7f 100644 --- a/src/main/java/frc/robot/commands/ZoneCheck.java +++ b/src/main/java/frc/robot/commands/ZoneCheck.java @@ -20,12 +20,13 @@ public class ZoneCheck extends Command { Neutral; } - public ZoneCheck() { - getBotPose(); + @Override + public void initialize() { } @Override - public void initialize() { + public void execute() { + getZone(); DriverStation.getAlliance().ifPresent((aliance) -> { if (aliance == Alliance.Blue) { switch (zone) { @@ -33,19 +34,15 @@ public class ZoneCheck extends Command { System.out.println("Im Home"); case Neutral: System.out.println("Uhhhhhhhh not red"); - ; default: System.out.println("BOOOOO, BOOOO RED"); - ; } } else { switch (zone) { case Blue: System.out.println("Screw Blue"); - ; case Neutral: System.out.println("Uhhhhhhhh not red"); - ; default: System.out.println("Im Home"); } @@ -53,11 +50,6 @@ public class ZoneCheck extends Command { }); } - @Override - public void execute() { - - } - @Override public boolean isFinished() { return false;