From 0d274c7075e5daadad3f91fabdd34f5dc3b471f5 Mon Sep 17 00:00:00 2001 From: Juan Miguel Jimeno Date: Wed, 17 May 2017 18:41:56 +0800 Subject: [PATCH] changed hardcoded pwm resolution to defined resolution --- Kinematics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kinematics.cpp b/Kinematics.cpp index 49bb64a..7e48f2a 100644 --- a/Kinematics.cpp +++ b/Kinematics.cpp @@ -132,5 +132,5 @@ Kinematics::velocities Kinematics::getVelocities(int motor1, int motor2, int mot int Kinematics::rpmToPWM(int rpm) { //remap scale of target RPM vs MAX_RPM to PWM - return (((double) rpm / (double) max_rpm_) * 255); + return (((double) rpm / (double) max_rpm_) * pwm_res_); }