From: iefomit Date: Wed, 11 Feb 2026 23:52:31 +0000 (-0800) Subject: sets to swerve comp if sim X-Git-Url: https://git.taranathan.com/?a=commitdiff_plain;h=3773614ba1b774285e9948df5ff777ffb4fbe7e7;p=FRC2026.git sets to swerve comp if sim --- diff --git a/src/main/java/frc/robot/RobotId.java b/src/main/java/frc/robot/RobotId.java index abcca59..f19bb5b 100644 --- a/src/main/java/frc/robot/RobotId.java +++ b/src/main/java/frc/robot/RobotId.java @@ -1,5 +1,7 @@ package frc.robot; +import frc.robot.constants.Constants; + import edu.wpi.first.wpilibj.Preferences; /** @@ -71,9 +73,13 @@ public enum RobotId { } } - if (robotId == RobotId.Default) { - throw new RuntimeException("RobotId is set to Default (or was unset)! Please set it to something."); - } + if (robotId == RobotId.Default) { + if (Constants.CURRENT_MODE == Constants.Mode.SIM) { + robotId = RobotId.SwerveCompetition; // Default to competition robot for simulation + } else { + throw new RuntimeException("RobotId is set to Default (or was unset)! Please set it to something."); + } + } // return the robot identity return robotId;