mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
[wpilib] Fix typos in simulation classes (#2799)
This commit is contained in:
@@ -15,10 +15,10 @@
|
||||
|
||||
using namespace frc::sim;
|
||||
|
||||
AnalogEncoderSim::AnalogEncoderSim(const frc::AnalogEncoder& analogEncoder) {
|
||||
AnalogEncoderSim::AnalogEncoderSim(const frc::AnalogEncoder& encoder) {
|
||||
wpi::SmallString<128> fullname;
|
||||
wpi::raw_svector_ostream os(fullname);
|
||||
os << "AnalogEncoder" << '[' << analogEncoder.GetChannel() << ']';
|
||||
os << "AnalogEncoder" << '[' << encoder.GetChannel() << ']';
|
||||
frc::sim::SimDeviceSim deviceSim{fullname.c_str()};
|
||||
m_positionSim = deviceSim.GetDouble("Position");
|
||||
}
|
||||
|
||||
@@ -26,12 +26,14 @@ class AnalogEncoderSim {
|
||||
/**
|
||||
* Constructs from an AnalogEncoder object.
|
||||
*
|
||||
* @param analogInput AnalogEncoder to simulate
|
||||
* @param encoder AnalogEncoder to simulate
|
||||
*/
|
||||
explicit AnalogEncoderSim(const AnalogEncoder& analogEncoder);
|
||||
explicit AnalogEncoderSim(const AnalogEncoder& encoder);
|
||||
|
||||
/**
|
||||
* Set the position using an {@link Rotation2d}.
|
||||
*
|
||||
* @param angle The angle.
|
||||
*/
|
||||
void SetPosition(Rotation2d angle);
|
||||
|
||||
|
||||
@@ -29,6 +29,8 @@ public class AnalogEncoderSim {
|
||||
|
||||
/**
|
||||
* Set the position using an {@link Rotation2d}.
|
||||
*
|
||||
* @param angle The angle.
|
||||
*/
|
||||
public void setPosition(Rotation2d angle) {
|
||||
setTurns(angle.getDegrees() / 360.0);
|
||||
|
||||
Reference in New Issue
Block a user