mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[hal] Change usage reporting to string-based (#7763)
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <hal/FRCUsageReporting.h>
|
||||
#include <hal/UsageReporting.h>
|
||||
#include <networktables/NetworkTable.h>
|
||||
#include <networktables/NetworkTableInstance.h>
|
||||
#include <wpi/StringMap.h>
|
||||
@@ -77,8 +77,7 @@ bool SmartDashboard::IsPersistent(std::string_view key) {
|
||||
|
||||
nt::NetworkTableEntry SmartDashboard::GetEntry(std::string_view key) {
|
||||
if (!gReported) {
|
||||
HAL_Report(HALUsageReporting::kResourceType_SmartDashboard,
|
||||
HALUsageReporting::kSmartDashboard_Instance);
|
||||
HAL_ReportUsage("SmartDashboard", "");
|
||||
gReported = true;
|
||||
}
|
||||
return GetInstance().table->GetEntry(key);
|
||||
@@ -89,8 +88,7 @@ void SmartDashboard::PutData(std::string_view key, wpi::Sendable* data) {
|
||||
throw FRC_MakeError(err::NullParameter, "value");
|
||||
}
|
||||
if (!gReported) {
|
||||
HAL_Report(HALUsageReporting::kResourceType_SmartDashboard,
|
||||
HALUsageReporting::kSmartDashboard_Instance);
|
||||
HAL_ReportUsage("SmartDashboard", "");
|
||||
gReported = true;
|
||||
}
|
||||
auto& inst = GetInstance();
|
||||
|
||||
Reference in New Issue
Block a user