mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-04 03:11:43 +00:00
[hal] Change usage reporting to string-based (#7763)
This commit is contained in:
@@ -41,8 +41,8 @@ class WPILIB_DLLEXPORT DifferentialDriveKinematics
|
||||
constexpr explicit DifferentialDriveKinematics(units::meter_t trackWidth)
|
||||
: trackWidth(trackWidth) {
|
||||
if (!std::is_constant_evaluated()) {
|
||||
wpi::math::MathSharedStore::ReportUsage(
|
||||
wpi::math::MathUsageId::kKinematics_DifferentialDrive, 1);
|
||||
wpi::math::MathSharedStore::ReportUsage("DifferentialDriveKinematics",
|
||||
"");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -66,8 +66,7 @@ class WPILIB_DLLEXPORT MecanumDriveKinematics
|
||||
SetInverseKinematics(frontLeftWheel, frontRightWheel, rearLeftWheel,
|
||||
rearRightWheel);
|
||||
m_forwardKinematics = m_inverseKinematics.householderQr();
|
||||
wpi::math::MathSharedStore::ReportUsage(
|
||||
wpi::math::MathUsageId::kKinematics_MecanumDrive, 1);
|
||||
wpi::math::MathSharedStore::ReportUsage("MecanumDriveKinematics", "");
|
||||
}
|
||||
|
||||
MecanumDriveKinematics(const MecanumDriveKinematics&) = default;
|
||||
|
||||
@@ -78,8 +78,7 @@ class SwerveDriveKinematics
|
||||
|
||||
m_forwardKinematics = m_inverseKinematics.householderQr();
|
||||
|
||||
wpi::math::MathSharedStore::ReportUsage(
|
||||
wpi::math::MathUsageId::kKinematics_SwerveDrive, 1);
|
||||
wpi::math::MathSharedStore::ReportUsage("SwerveDriveKinematics", "");
|
||||
}
|
||||
|
||||
explicit SwerveDriveKinematics(
|
||||
@@ -95,8 +94,7 @@ class SwerveDriveKinematics
|
||||
|
||||
m_forwardKinematics = m_inverseKinematics.householderQr();
|
||||
|
||||
wpi::math::MathSharedStore::ReportUsage(
|
||||
wpi::math::MathUsageId::kKinematics_SwerveDrive, 1);
|
||||
wpi::math::MathSharedStore::ReportUsage("Kinematics_SwerveDrive", "");
|
||||
}
|
||||
|
||||
SwerveDriveKinematics(const SwerveDriveKinematics&) = default;
|
||||
|
||||
@@ -48,8 +48,7 @@ class SwerveDriveOdometry
|
||||
: SwerveDriveOdometry::Odometry(m_kinematicsImpl, gyroAngle,
|
||||
modulePositions, initialPose),
|
||||
m_kinematicsImpl(kinematics) {
|
||||
wpi::math::MathSharedStore::ReportUsage(
|
||||
wpi::math::MathUsageId::kOdometry_SwerveDrive, 1);
|
||||
wpi::math::MathSharedStore::ReportUsage("SwerveDriveOdometry", "");
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -53,8 +53,7 @@ class SwerveDriveOdometry3d
|
||||
: SwerveDriveOdometry3d::Odometry3d(m_kinematicsImpl, gyroAngle,
|
||||
modulePositions, initialPose),
|
||||
m_kinematicsImpl(kinematics) {
|
||||
wpi::math::MathSharedStore::ReportUsage(
|
||||
wpi::math::MathUsageId::kOdometry_SwerveDrive, 1);
|
||||
wpi::math::MathSharedStore::ReportUsage("SwerveDriveOdometry3d", "");
|
||||
}
|
||||
#if defined(__GNUC__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
Reference in New Issue
Block a user