mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
[hal] Cache sim TCP data to update during HAL_RefreshDSData (#7360)
This commit is contained in:
@@ -11,6 +11,7 @@ import edu.wpi.first.hal.DriverStationJNI;
|
||||
import edu.wpi.first.hal.MatchInfoData;
|
||||
import edu.wpi.first.hal.simulation.DriverStationDataJNI;
|
||||
import edu.wpi.first.wpilibj.DriverStation.MatchType;
|
||||
import edu.wpi.first.wpilibj.simulation.DriverStationSim;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class MatchInfoDataTest {
|
||||
@@ -19,6 +20,8 @@ class MatchInfoDataTest {
|
||||
MatchType matchType = MatchType.Qualification;
|
||||
DriverStationDataJNI.setMatchInfo("Event Name", "Game Message", 174, 191, matchType.ordinal());
|
||||
|
||||
DriverStationSim.notifyNewData();
|
||||
|
||||
MatchInfoData outMatchInfo = new MatchInfoData();
|
||||
DriverStationJNI.getMatchInfo(outMatchInfo);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user