diff --git a/include/position/odomWheel.hpp b/include/position/odomWheel.hpp index d2b66059..ff8185c2 100644 --- a/include/position/odomWheel.hpp +++ b/include/position/odomWheel.hpp @@ -10,26 +10,26 @@ namespace Pronounce { */ class OdomWheel { private: - double mmPosition = 0; + double position = 0; double lastPosition = 0; public: /** - * Get the mm at the current moment + * Get the position at the current moment */ - double getMM() { - return this->mmPosition; + double getPosition() { + return this->position; } /** - * Set the MM + * Set the position */ - void setMM(double mmPosition) { - this->mmPosition = mmPosition; + void setPosition(double position) { + this->position = position; } double getChange() { - double difference = this->getMM() - this->lastPosition; - this->lastPosition = this->getMM(); + double difference = this->getPosition() - this->lastPosition; + this->lastPosition = this->getPosition(); return difference; } diff --git a/src/position/motorOdom.cpp b/src/position/motorOdom.cpp index a2ad9052..aea799c7 100644 --- a/src/position/motorOdom.cpp +++ b/src/position/motorOdom.cpp @@ -1,9 +1,9 @@ #include "motorOdom.hpp" namespace Pronounce { - MotorOdom::MotorOdom(pros::Motor* motor, double radiusMM) { + MotorOdom::MotorOdom(pros::Motor* motor, double radius) { this->motor = motor; - this->radius = radiusMM; + this->radius = radius; this->motor->set_encoder_units(pros::E_MOTOR_ENCODER_ROTATIONS); } @@ -11,6 +11,6 @@ namespace Pronounce { } void MotorOdom::update() { - this->setMM(motor->get_position() * radius * M_PI * 2.0 * tuningFactor); + this->setPosition(motor->get_position() * radius * M_PI * 2.0 * tuningFactor); } } // namespace Pronounce