mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
Fix main function initialization (#1176)
I don't have a good way to ensure this always works, so this is going to be a documentation issue. But initializeHardwareConfiguration is now reentrant, so we can just have all tests call it.
This commit is contained in:
committed by
Peter Johnson
parent
f5b1028b5a
commit
89d15f061b
@@ -18,7 +18,6 @@ import org.junit.runners.model.MultipleFailureException;
|
||||
|
||||
import edu.wpi.first.wpilibj.DriverStation;
|
||||
import edu.wpi.first.wpilibj.MockDS;
|
||||
import edu.wpi.first.wpilibj.RobotBase;
|
||||
import edu.wpi.first.wpilibj.Timer;
|
||||
import edu.wpi.first.wpilibj.hal.HAL;
|
||||
import edu.wpi.first.wpilibj.livewindow.LiveWindow;
|
||||
@@ -48,7 +47,7 @@ public abstract class AbstractComsSetup {
|
||||
if (!initialized) {
|
||||
try {
|
||||
// Set some implementations so that the static methods work properly
|
||||
RobotBase.initializeHardwareConfiguration();
|
||||
HAL.initialize(500, 0);
|
||||
HAL.observeUserProgramStarting();
|
||||
DriverStation.getInstance().getAlliance();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user