[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

@@ -13,11 +13,11 @@ TEST(SharpIRTest, SimDevices) {
SharpIR s = SharpIR::GP2Y0A02YK0F(1);
SharpIRSim sim(s);
EXPECT_EQ(20, s.GetRange().value());
EXPECT_EQ(0.2, s.GetRange().value());
sim.SetRange(units::centimeter_t{30});
EXPECT_EQ(30, s.GetRange().value());
sim.SetRange(30_cm);
EXPECT_EQ(0.3, s.GetRange().value());
sim.SetRange(units::centimeter_t{300});
EXPECT_EQ(150, s.GetRange().value());
sim.SetRange(300_cm);
EXPECT_EQ(1.5, s.GetRange().value());
}