Skip to content

Commit e47ebac

Browse files
committed
aa
1 parent 1b98bf8 commit e47ebac

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/main/java/frc/robot/Lib/BallDetectionTest.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ public class BallDetectionTest extends IterativeRobotBase {
1515
private int testsPassed = 0;
1616
private int testsFailed = 0;
1717
private long startTime;
18+
private boolean win;
1819

1920
public BallDetectionTest() {
2021
super(0.02);
@@ -32,7 +33,9 @@ public void startCompetition() {
3233
testParallaxGeometry();
3334

3435
printResults();
35-
System.exit(testsFailed > 0 ? 1 : 0);
36+
try { Thread.sleep(50); } catch (InterruptedException e) {}
37+
38+
System.exit(win ? 0 : 1);
3639
}
3740

3841
private void testParallaxGeometry() {
@@ -284,10 +287,10 @@ private void printResults() {
284287

285288
if (testsFailed == 0) {
286289
System.out.println("ALL TESTS PASSED - Parallax math is correct!");
287-
System.exit(0);
290+
win = true;
288291
} else {
289292
System.out.println("SOME TESTS FAILED - Check ray intersection logic");
290-
System.exit(1);
293+
win = false;
291294
}
292295
}
293296

0 commit comments

Comments
 (0)