mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-06 03:31:43 +00:00
[wpilib] Const-qualify EncoderSim getters (#5660)
This commit is contained in:
@@ -191,7 +191,7 @@ void EncoderSim::SetDistance(double distance) {
|
||||
HALSIM_SetEncoderDistance(m_index, distance);
|
||||
}
|
||||
|
||||
double EncoderSim::GetDistance() {
|
||||
double EncoderSim::GetDistance() const {
|
||||
return HALSIM_GetEncoderDistance(m_index);
|
||||
}
|
||||
|
||||
@@ -199,6 +199,6 @@ void EncoderSim::SetRate(double rate) {
|
||||
HALSIM_SetEncoderRate(m_index, rate);
|
||||
}
|
||||
|
||||
double EncoderSim::GetRate() {
|
||||
double EncoderSim::GetRate() const {
|
||||
return HALSIM_GetEncoderRate(m_index);
|
||||
}
|
||||
|
||||
@@ -295,7 +295,7 @@ class EncoderSim {
|
||||
*
|
||||
* @return the encoder distance
|
||||
*/
|
||||
double GetDistance();
|
||||
double GetDistance() const;
|
||||
|
||||
/**
|
||||
* Change the rate of the encoder.
|
||||
@@ -309,7 +309,7 @@ class EncoderSim {
|
||||
*
|
||||
* @return the rate of change
|
||||
*/
|
||||
double GetRate();
|
||||
double GetRate() const;
|
||||
|
||||
private:
|
||||
explicit EncoderSim(int index) : m_index{index} {}
|
||||
|
||||
Reference in New Issue
Block a user