[wpilib] Correct SmartDashboard usage reporting (#6157)

This commit is contained in:
Starlight220
2024-01-05 21:18:29 +02:00
committed by GitHub
parent 106518c3f8
commit 3e40b9e5da
2 changed files with 7 additions and 4 deletions

View File

@@ -72,7 +72,8 @@ bool SmartDashboard::IsPersistent(std::string_view key) {
nt::NetworkTableEntry SmartDashboard::GetEntry(std::string_view key) {
if (!gReported) {
HAL_Report(HALUsageReporting::kResourceType_SmartDashboard, 0);
HAL_Report(HALUsageReporting::kResourceType_SmartDashboard,
HALUsageReporting::kSmartDashboard_Instance);
gReported = true;
}
return GetInstance().table->GetEntry(key);
@@ -83,7 +84,8 @@ void SmartDashboard::PutData(std::string_view key, wpi::Sendable* data) {
throw FRC_MakeError(err::NullParameter, "value");
}
if (!gReported) {
HAL_Report(HALUsageReporting::kResourceType_SmartDashboard, 0);
HAL_Report(HALUsageReporting::kResourceType_SmartDashboard,
HALUsageReporting::kSmartDashboard_Instance);
gReported = true;
}
auto& inst = GetInstance();