[hal] Cache sim TCP data to update during HAL_RefreshDSData (#7360)

This commit is contained in:
Thad House
2024-11-19 04:56:32 +00:00
committed by GitHub
parent d312bccfeb
commit 561078ce29
3 changed files with 92 additions and 36 deletions

View File

@@ -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);