From 9ae52417a753dfd44fbc4d57a432cf272e42d205 Mon Sep 17 00:00:00 2001 From: Aceius E Date: Mon, 4 Mar 2024 17:24:31 -0800 Subject: [PATCH] Detect simulations in feature flags --- src/main/java/frc/robot/Constants.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/main/java/frc/robot/Constants.java b/src/main/java/frc/robot/Constants.java index 8e6434d..559be86 100644 --- a/src/main/java/frc/robot/Constants.java +++ b/src/main/java/frc/robot/Constants.java @@ -15,7 +15,9 @@ */ public final class Constants { public static enum Bot { - WOOD_BOT, COMP_BOT + WOOD_BOT, + COMP_BOT, + SIM_BOT } public static final Bot currentBot; @@ -36,6 +38,10 @@ public static enum Bot { serialNumber = RobotBase.isReal() ? RobotController.getSerialNumber() : "simulation"; switch (serialNumber) { + case "simulation": + currentBot = Bot.SIM_BOT; + break; + case "03282B00": // Wood Bot Serial Number currentBot = Bot.WOOD_BOT; break; @@ -50,6 +56,7 @@ public static enum Bot { public static class HangConstants { static { switch (currentBot) { + case SIM_BOT: case WOOD_BOT: HAS_HANG = false; break; @@ -95,6 +102,7 @@ public static class DriverConstants { public static class ArmConstants { static { switch (currentBot) { + case SIM_BOT: case WOOD_BOT: HAS_ARM = false; break; @@ -135,6 +143,7 @@ public static class ArmConstants { public static class IntakeShooterConstants { static { switch (currentBot) { + case SIM_BOT: case WOOD_BOT: HAS_INTAKE = false; break; @@ -184,6 +193,7 @@ public static class SwerveModuleConstants { static { switch (currentBot) { + case SIM_BOT: case WOOD_BOT: // Front Left VELOCITY_MOTOR_ID_FL = 41; @@ -292,6 +302,7 @@ public static class SwerveModuleConstants { public static class SwerveDrivetrainConstants { static { switch (currentBot) { + case SIM_BOT: case WOOD_BOT: MODULE_LOCATION_X = 26.0 / 100; MODULE_LOCATION_Y = 28.5 / 100;