[wpilibc] Only call HAL_Report when initializing SmartDashboard (#4006)

This commit is contained in:
Dustin Spicuzza
2022-02-06 03:07:55 -05:00
committed by GitHub
parent 3f77725cd3
commit 4f1782f66e

View File

@@ -19,6 +19,8 @@ using namespace frc;
namespace {
struct Instance {
Instance() { HAL_Report(HALUsageReporting::kResourceType_SmartDashboard, 0); }
detail::ListenerExecutor listenerExecutor;
std::shared_ptr<nt::NetworkTable> 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;
}