From 0af65ea7877242242d4b1206ab4b20802892ebda Mon Sep 17 00:00:00 2001 From: Thad House Date: Thu, 7 May 2026 20:04:37 -0700 Subject: [PATCH] [sim] Make HalSim DS extension a no-op (#8872) This way this doesn't crash until we get real support added. --- simulation/halsim_ds_socket/src/main/native/cpp/main.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/simulation/halsim_ds_socket/src/main/native/cpp/main.cpp b/simulation/halsim_ds_socket/src/main/native/cpp/main.cpp index c4f68bdd39..3d6a92e3d3 100644 --- a/simulation/halsim_ds_socket/src/main/native/cpp/main.cpp +++ b/simulation/halsim_ds_socket/src/main/native/cpp/main.cpp @@ -180,6 +180,11 @@ static void SetupEventLoop(wpi::net::uv::Loop& loop) { static std::unique_ptr eventLoopRunner; +void ThisIsAHackDontCallThis() { + eventLoopRunner = std::make_unique(); + eventLoopRunner->ExecAsync(SetupEventLoop); +} + /*---------------------------------------------------------------------------- ** Main entry point. We will start listen threads going, processing ** against our driver station packet @@ -203,10 +208,6 @@ int HALSIM_InitExtension(void) { singleByte = std::make_unique("0"); - eventLoopRunner = std::make_unique(); - - eventLoopRunner->ExecAsync(SetupEventLoop); - std::puts("DriverStationSocket Initialized!"); return 0; }