diff --git a/Encoder.cpp b/Encoder.cpp index 06184de..07e2558 100644 --- a/Encoder.cpp +++ b/Encoder.cpp @@ -1,9 +1,9 @@ #include "Encoder.h" -Encoder::Encoder(unsigned char transitionsPerRotation, +Encoder::Encoder(unsigned char pulsesPerRevolution, unsigned char distancePerRotation) { //: Encoder::Encoder() { - this->transitionsPerRevolution = transitionsPerRotation; + this->pulsesPerRevolution = pulsesPerRevolution; this->distancePerRevolution = distancePerRotation; } diff --git a/Encoder.h b/Encoder.h index 7b6f40b..e85cdaf 100644 --- a/Encoder.h +++ b/Encoder.h @@ -8,11 +8,11 @@ namespace RoboidControl { class Encoder { public: /// @brief Creates a sensor which measures distance from pulses - /// @param transitionsPerRevolution The number of pulse edges which make a + /// @param pulsesPerRevolution The number of pulse edges which make a /// full rotation /// @param distancePerRevolution The distance a wheel travels per full /// rotation - Encoder(unsigned char transitionsPerRevolution = 1, + Encoder(unsigned char pulsesPerRevolution = 1, unsigned char distancePerRevolution = 1); /// @brief Get the total number of pulses since the previous call @@ -36,11 +36,11 @@ public: /// @param currentTimeMs The clock time in milliseconds /// @return The speed in meters per second. /// @note this value is dependent on the accurate setting of the - /// transitionsPerRevolution and distancePerRevolution parameters; + /// pulsesPerRevolution and distancePerRevolution parameters; virtual float GetSpeed(float currentTimeMs); /// @brief The numer of pulses corresponding to a full rotation of the axle - unsigned char transitionsPerRevolution = 1; + unsigned char pulsesPerRevolution = 1; /// @brief The number of revolutions which makes the wheel move forward 1 /// meter unsigned char distancePerRevolution = 1;