summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmanuele Caruso <emanuele.caruso@gmail.com>2011-07-24 19:30:29 +0200
committerEmanuele Caruso <emanuele.caruso@gmail.com>2011-07-24 19:30:29 +0200
commitf712ec88f34dc71ab230a11cad12d4e599455c8a (patch)
tree3a69c1dd3105f407f3584fe9a55989b16dbb900f
parent33edcb56e2a6e85943f261624d6f08a81889a981 (diff)
Fixed bug which in some cases caused the moves to be done at full speed without acceleration
-rw-r--r--Sprinter/Sprinter.pde2
1 files changed, 1 insertions, 1 deletions
diff --git a/Sprinter/Sprinter.pde b/Sprinter/Sprinter.pde
index 8bb68d7..f9b73fc 100644
--- a/Sprinter/Sprinter.pde
+++ b/Sprinter/Sprinter.pde
@@ -1114,7 +1114,7 @@ inline void linear_move(unsigned long axis_steps_remaining[]) // make linear mov
if(axis_steps_remaining[i] >0) {
// multiplying slowest_start_axis_max_interval by axis_steps_remaining[slowest_start_axis]
// could lead to overflows when we have long distance moves (say, 390625*390625 > sizeof(unsigned long))
- float steps_remaining_ratio = axis_steps_remaining[slowest_start_axis] / axis_steps_remaining[i];
+ float steps_remaining_ratio = (float) axis_steps_remaining[slowest_start_axis] / axis_steps_remaining[i];
new_axis_max_intervals[i] = slowest_start_axis_max_interval * steps_remaining_ratio;
if(i == primary_axis) {