[wpimath] Remove unit suffixes from variable names (#7529)

* Move units into API docs instead because suffixes make user code verbose and hard to read
* Rename trackWidth to trackwidth
* Make ultrasonic classes use meters instead of a mix of m, cm, mm, ft,
  and inches
This commit is contained in:
Tyler Veness
2025-02-10 07:23:04 -08:00
committed by GitHub
parent 764ada9b66
commit ac1705ae2b
250 changed files with 2953 additions and 3584 deletions

View File

@@ -25,7 +25,7 @@ class DifferentialDrivetrainSim {
* system can be created with
* LinearSystemId::DrivetrainVelocitySystem() or
* LinearSystemId::IdentifyDrivetrainSystem().
* @param trackWidth The robot's track width.
* @param trackwidth The robot's trackwidth.
* @param driveMotor A DCMotor representing the left side of the drivetrain.
* @param gearingRatio The gearingRatio ratio of the left side, as output over
* input. This must be the same ratio as the ratio used to
@@ -41,7 +41,7 @@ class DifferentialDrivetrainSim {
* starting point.
*/
DifferentialDrivetrainSim(
LinearSystem<2, 2, 2> plant, units::meter_t trackWidth,
LinearSystem<2, 2, 2> plant, units::meter_t trackwidth,
DCMotor driveMotor, double gearingRatio, units::meter_t wheelRadius,
const std::array<double, 7>& measurementStdDevs = {});
@@ -56,7 +56,7 @@ class DifferentialDrivetrainSim {
* center.
* @param mass The mass of the drivebase.
* @param wheelRadius The radius of the wheels on the drivetrain.
* @param trackWidth The robot's track width, or distance between left and
* @param trackwidth The robot's trackwidth, or distance between left and
* right wheels.
* @param measurementStdDevs Standard deviations for measurements, in the form
* [x, y, heading, left velocity, right velocity,
@@ -70,7 +70,7 @@ class DifferentialDrivetrainSim {
DifferentialDrivetrainSim(
frc::DCMotor driveMotor, double gearing, units::kilogram_square_meter_t J,
units::kilogram_t mass, units::meter_t wheelRadius,
units::meter_t trackWidth,
units::meter_t trackwidth,
const std::array<double, 7>& measurementStdDevs = {});
/**

View File

@@ -31,9 +31,9 @@ class SharpIRSim {
/**
* Set the range returned by the distance sensor.
*
* @param rng range of the target returned by the sensor
* @param range range of the target returned by the sensor
*/
void SetRange(units::centimeter_t rng);
void SetRange(units::meter_t range);
private:
hal::SimDouble m_simRange;