mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Fixes a bug where the testing framework would never set the implementation for the libraries.
Change-Id: I8f745ebd870c8dacf28b0459e3d5128195fcbb87
This commit is contained in:
@@ -16,8 +16,12 @@ import org.junit.runner.Description;
|
||||
import org.junit.runners.model.MultipleFailureException;
|
||||
|
||||
import edu.wpi.first.wpilibj.DriverStation;
|
||||
import edu.wpi.first.wpilibj.HLUsageReporting;
|
||||
import edu.wpi.first.wpilibj.RobotState;
|
||||
import edu.wpi.first.wpilibj.Timer;
|
||||
import edu.wpi.first.wpilibj.communication.FRCNetworkCommunicationsLibrary;
|
||||
import edu.wpi.first.wpilibj.internal.HardwareHLUsageReporting;
|
||||
import edu.wpi.first.wpilibj.internal.HardwareTimer;
|
||||
import edu.wpi.first.wpilibj.livewindow.LiveWindow;
|
||||
|
||||
/**
|
||||
@@ -42,6 +46,12 @@ public abstract class AbstractComsSetup {
|
||||
*/
|
||||
static{
|
||||
if (!initialized) {
|
||||
// Set some implementations so that the static methods work properly
|
||||
Timer.SetImplementation(new HardwareTimer());
|
||||
HLUsageReporting.SetImplementation(new HardwareHLUsageReporting());
|
||||
RobotState.SetImplementation(DriverStation.getInstance());
|
||||
|
||||
|
||||
// Start up the network communications
|
||||
FRCNetworkCommunicationsLibrary.FRCNetworkCommunicationReserve();
|
||||
FRCNetworkCommunicationsLibrary
|
||||
|
||||
Reference in New Issue
Block a user