mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
[hal] Change usage reporting to string-based (#7763)
This commit is contained in:
@@ -7,7 +7,9 @@
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <fmt/format.h>
|
||||
#include <hal/CTREPCM.h>
|
||||
#include <hal/UsageReporting.h>
|
||||
#include <wpi/NullDeleter.h>
|
||||
#include <wpi/StackTrace.h>
|
||||
|
||||
@@ -289,6 +291,11 @@ Compressor PneumaticsControlModule::MakeCompressor() {
|
||||
return Compressor{m_module, PneumaticsModuleType::CTREPCM};
|
||||
}
|
||||
|
||||
void PneumaticsControlModule::ReportUsage(std::string_view device,
|
||||
std::string_view data) {
|
||||
HAL_ReportUsage(fmt::format("PCM[{}]/{}", m_module, device), data);
|
||||
}
|
||||
|
||||
std::shared_ptr<PneumaticsBase> PneumaticsControlModule::GetForModule(
|
||||
int module) {
|
||||
std::string stackTrace = wpi::GetStackTrace(1);
|
||||
|
||||
Reference in New Issue
Block a user