[hal,wpilib,wpimath] Add Usage Reporting for Choreo and PathWeaver (#7464)

This commit is contained in:
sciencewhiz
2024-11-30 20:33:09 -08:00
committed by GitHub
parent 9807d60566
commit 892e062316
11 changed files with 39 additions and 0 deletions

View File

@@ -36,6 +36,10 @@ Trajectory TrajectoryUtil::FromPathweaverJson(std::string_view path) {
wpi::json json = wpi::json::parse(fileBuffer.value()->GetCharBuffer());
wpi::math::MathSharedStore::ReportUsage(
wpi::math::MathUsageId::kTrajectory_PathWeaver,
++pathWeaverTrajectoryInstances);
return Trajectory{json.get<std::vector<Trajectory::State>>()};
}