Skip to content

Commit

Permalink
??
Browse files Browse the repository at this point in the history
  • Loading branch information
GreenTomato5 committed Oct 31, 2024
1 parent 11751fe commit 8f7cb8e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 2 additions & 0 deletions src/main/java/frc/robot/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public void robotInit() {

if ("Crash".equals(System.getenv("CI_NAME"))) {
Crash.getInstance(this).run();
System.out.println("lalala");
}
}

Expand All @@ -37,6 +38,7 @@ public void robotPeriodic() {

if ("Crash".equals(System.getenv("CI_NAME"))) {
Crash.getInstance(this).periodic();
System.out.println("lalala");
}
}

Expand Down
16 changes: 8 additions & 8 deletions src/main/java/frc/robot/pioneersLib/CI/Crash.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ private void runSimTests() throws InterruptedException {

// Test autonomous
System.out.println("Testing auto");
setMode(true);
Thread.sleep(3000);
setMode(false);
setMode(true, true);
Thread.sleep(1000);
setMode(false, false);

if (checkForErrors()) {
crashesAuto = true;
Expand All @@ -80,9 +80,9 @@ private void runSimTests() throws InterruptedException {

// Test teleop
System.out.println("Testing teleop");
setMode(false);
Thread.sleep(3000);
setMode(false);
setMode(false, true);
Thread.sleep(1000);
setMode(false, false);

if (checkForErrors()) {
crashesTele = true;
Expand All @@ -99,8 +99,8 @@ private void runSimTests() throws InterruptedException {
}
}

public void setMode(boolean autonomous) {
DriverStationSim.setEnabled(true);
public void setMode(boolean autonomous, boolean enable) {
DriverStationSim.setEnabled(enable);

DriverStationSim.setAutonomous(autonomous);
}
Expand Down

0 comments on commit 8f7cb8e

Please sign in to comment.