package frc.robot;
+import frc.robot.constants.Constants;
+
import edu.wpi.first.wpilibj.Preferences;
/**
}
}
- 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;