]> git.taranathan.com Git - FRC2026.git/commitdiff
sets to swerve comp if sim
authoriefomit <timofei.stem@gmail.com>
Wed, 11 Feb 2026 23:52:31 +0000 (15:52 -0800)
committeriefomit <timofei.stem@gmail.com>
Wed, 11 Feb 2026 23:52:31 +0000 (15:52 -0800)
src/main/java/frc/robot/RobotId.java

index abcca59073700cb8a194554c5c1ec356e632b2f0..f19bb5ba5d5f863851872abbbec03f411e8beb8e 100644 (file)
@@ -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;