changed hardcoded pwm resolution to defined resolution
parent
571a3fdac9
commit
0d274c7075
|
@ -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 / (double) max_rpm_) * 255);
|
return (((double) rpm / (double) max_rpm_) * pwm_res_);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue