[wpilib] Const-qualify EncoderSim getters (#5660)

This commit is contained in:
Starlight220
2023-09-18 18:18:18 +03:00
committed by GitHub
parent 7be290147c
commit e67df8c180
2 changed files with 4 additions and 4 deletions

View File

@@ -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);
}

View File

@@ -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} {}