fixed rpmToPWM()
parent
45b26fec23
commit
571a3fdac9
|
@ -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 / max_rpm_) * 255);
|
||||
return (((double) rpm / (double) max_rpm_) * 255);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue