fixed rpmToPWM()

pull/1/head
Juan Miguel Jimeno 2017-03-02 21:17:36 +08:00 committed by GitHub
parent 45b26fec23
commit 571a3fdac9
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) int Kinematics::rpmToPWM(int rpm)
{ {
//remap scale of target RPM vs MAX_RPM to PWM //remap scale of target RPM vs MAX_RPM to PWM
return (double)((rpm / max_rpm_) * 255); return (((double) rpm / (double) max_rpm_) * 255);
} }