Skip to content

Commit

Permalink
MM
Browse files Browse the repository at this point in the history
  • Loading branch information
GreenTomato5 committed Nov 3, 2024
1 parent 75d17a4 commit d34fa0f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/main/java/frc/robot/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public void robotInit() {

@Override
public void robotPeriodic() {
System.out.println("Robot actually runned");
managerSubsystem.periodic();
CommandScheduler.getInstance().run();
}
Expand Down
12 changes: 8 additions & 4 deletions src/main/java/frc/robot/pioneersLib/CI/CrashCheck.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,27 +109,31 @@ private void logState() {
}

private boolean hasErrors() {
return (DriverStation.getMatchTime() < 0 || !NetworkTableInstance.getDefault().isConnected());
System.out.println("Match Time: " + DriverStation.getMatchTime());
System.out.println("Network Table Connected: " + NetworkTableInstance.getDefault().isConnected());
System.out.println("DS Attached: " + DriverStation.isDSAttached());

return (DriverStation.getMatchTime() < 0 || !NetworkTableInstance.getDefault().isConnected() || !DriverStation.isDSAttached());
}

private void runTest() {
timer.start();
if (timer.get() < 1) {
currentState.set(CrashCheckStates.DISABLED);
if (hasErrors()) {
System.out.println("Crashes in Disabled");
// System.out.println("Crashes in Disabled");
// System.exit(1);
}
} else if (timer.get() < 2) {
currentState.set(CrashCheckStates.TELEOP);
if (hasErrors()) {
System.out.println("Crashes in Teleop");
// System.out.println("Crashes in Teleop");
// System.exit(1);
}
} else if (timer.get() < 3) {
currentState.set(CrashCheckStates.AUTONOMOUS);
if (hasErrors()) {
System.out.println("Crashes in Auto");
// System.out.println("Crashes in Auto");
// System.exit(1);
}
} else {
Expand Down

0 comments on commit d34fa0f

Please sign in to comment.