Skip to content

Commit

Permalink
Merge branch 'roborio-address-bug-patch'
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinskycastle committed Oct 15, 2024
2 parents 6154c21 + a647b92 commit 64dddde
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/main/java/frc/robot/constants/ROBOT.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import edu.wpi.first.math.util.Units;
import edu.wpi.first.wpilibj.RobotController;
import frc.robot.Robot;

import org.littletonrobotics.frc2023.util.Alert;
import org.littletonrobotics.frc2023.util.Alert.AlertType;

Expand Down Expand Up @@ -107,8 +109,13 @@ public static void initConstants() {
} else if (RobotController.getSerialNumber().equals(ROBOT_ID.BOBOT.getSerial())) {
alert.setText("Setting Robot Constants for Bobot");
initBobot();
} else if (RobotController.getSerialNumber().equals(ROBOT_ID.SIM.getSerial())) {
} else if (RobotController.getSerialNumber().equals(ROBOT_ID.SIM.getSerial()) && Robot.isSimulation()) {
alert.setText("Setting Robot Constants for Sim");
System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
System.out.println("!!! WARNING: This will put logging in debug mode !!!");
System.out.println("!!! and almost certainly crash the real robot! !!!");
System.out.println("!!! IF YOU ARE SEEING THIS IN THE DS CONSOLE, YOUR ROBOT WILL CRASH! !!!");
System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
initSim();
} else {
alert =
Expand Down

0 comments on commit 64dddde

Please sign in to comment.