From 4f1782f66e09b0ed1f3711d113b8d1203c972c2b Mon Sep 17 00:00:00 2001 From: Dustin Spicuzza Date: Sun, 6 Feb 2022 03:07:55 -0500 Subject: [PATCH] [wpilibc] Only call HAL_Report when initializing SmartDashboard (#4006) --- wpilibc/src/main/native/cpp/smartdashboard/SmartDashboard.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wpilibc/src/main/native/cpp/smartdashboard/SmartDashboard.cpp b/wpilibc/src/main/native/cpp/smartdashboard/SmartDashboard.cpp index 25bb61f330..13b6e1db42 100644 --- a/wpilibc/src/main/native/cpp/smartdashboard/SmartDashboard.cpp +++ b/wpilibc/src/main/native/cpp/smartdashboard/SmartDashboard.cpp @@ -19,6 +19,8 @@ using namespace frc; namespace { struct Instance { + Instance() { HAL_Report(HALUsageReporting::kResourceType_SmartDashboard, 0); } + detail::ListenerExecutor listenerExecutor; std::shared_ptr table = nt::NetworkTableInstance::GetDefault().GetTable("SmartDashboard"); @@ -28,7 +30,6 @@ struct Instance { } // namespace static Instance& GetInstance() { - HAL_Report(HALUsageReporting::kResourceType_SmartDashboard, 0); static Instance instance; return instance; }