changed hardcoded pwm resolution to defined resolution

pull/1/head
Juan Miguel Jimeno 2017-05-17 18:41:56 +08:00 committed by GitHub
parent 571a3fdac9
commit 0d274c7075
1 changed files with 1 additions and 1 deletions

View File

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