mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[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:
@@ -16,9 +16,9 @@ SharpIRSim::SharpIRSim(const SharpIR& sharpIR)
|
||||
|
||||
SharpIRSim::SharpIRSim(int channel) {
|
||||
frc::sim::SimDeviceSim deviceSim{"SharpIR", channel};
|
||||
m_simRange = deviceSim.GetDouble("Range (cm)");
|
||||
m_simRange = deviceSim.GetDouble("Range (m)");
|
||||
}
|
||||
|
||||
void SharpIRSim::SetRange(units::centimeter_t rng) {
|
||||
m_simRange.Set(rng.value());
|
||||
void SharpIRSim::SetRange(units::meter_t range) {
|
||||
m_simRange.Set(range.value());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user