Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wpilibc] fix encoder sim docs #6477

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions wpilibc/src/main/native/cpp/simulation/EncoderSim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ double EncoderSim::GetDistancePerPulse() const {
return HALSIM_GetEncoderDistancePerPulse(m_index);
}

void EncoderSim::SetDistancePerPulse(double distancePerPulse) {
HALSIM_SetEncoderDistancePerPulse(m_index, distancePerPulse);
void EncoderSim::SetDistancePerPulse(double samplesToAverage) {
HALSIM_SetEncoderDistancePerPulse(m_index, samplesToAverage);
}

void EncoderSim::ResetData() {
Expand Down
6 changes: 3 additions & 3 deletions wpilibc/src/main/native/include/frc/simulation/EncoderSim.h
Original file line number Diff line number Diff line change
Expand Up @@ -272,11 +272,11 @@ class EncoderSim {
double GetDistancePerPulse() const;

/**
* Change the encoder distance per pulse.
* Set the distance per pulse value.
*
* @param distancePerPulse the new distance per pulse
* @param samplesToAverage the new value
*/
void SetDistancePerPulse(double distancePerPulse);
void SetDistancePerPulse(double samplesToAverage);

/**
* Resets all simulation data for this encoder.
Expand Down
Loading