From 589a00e3792b4faceeffd1f17fc98eba00cb95a4 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Sun, 12 Dec 2021 22:23:13 -0800 Subject: [PATCH] [wpilibc] Start DriverStation thread from RobotBase (#3785) With the change from GetInstance to static functions, many functions don't call DriverStation::GetInstance(), so the DS thread wasn't getting started by default. Call InDisabled() to make sure this happens. --- wpilibc/src/main/native/cppcs/RobotBase.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wpilibc/src/main/native/cppcs/RobotBase.cpp b/wpilibc/src/main/native/cppcs/RobotBase.cpp index 78c286c5f4..3433a0240c 100644 --- a/wpilibc/src/main/native/cppcs/RobotBase.cpp +++ b/wpilibc/src/main/native/cppcs/RobotBase.cpp @@ -251,6 +251,9 @@ RobotBase::RobotBase() { } } + // Call DriverStation::InDisabled() to kick off DS thread + DriverStation::InDisabled(true); + // First and one-time initialization inst.GetTable("LiveWindow") ->GetSubTable(".status")