diff options
Diffstat (limited to 'AFMotor.cpp')
-rw-r--r-- | AFMotor.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/AFMotor.cpp b/AFMotor.cpp index 89c0dc8..bab2b8c 100644 --- a/AFMotor.cpp +++ b/AFMotor.cpp @@ -352,7 +352,7 @@ AF_Stepper::AF_Stepper(uint16_t steps, uint8_t num) { } void AF_Stepper::setSpeed(uint16_t rpm) { - usperstep = 60000000 / (revsteps * rpm); + usperstep = 60000000 / ((uint32_t)revsteps * (uint32_t)rpm); steppingcounter = 0; } |