summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbarclayo <barclayosborn@gmail.com>2011-10-29 11:17:13 -0700
committerbarclayo <barclayosborn@gmail.com>2011-10-29 11:17:13 -0700
commit67b81e0881b8ba7e9029d89c5819d6a80914a178 (patch)
tree9e9c16fd35782701eef7f48684efa05781143a0f
parent038ab7803e76138148aedfe00c9850d5aba36488 (diff)
Fix d calculation on XYZ moves where comparison was inside of abs() instead of comparing with the result.
-rw-r--r--Sprinter/Sprinter.pde2
1 files changed, 1 insertions, 1 deletions
diff --git a/Sprinter/Sprinter.pde b/Sprinter/Sprinter.pde
index 7a6bf5e..657efed 100644
--- a/Sprinter/Sprinter.pde
+++ b/Sprinter/Sprinter.pde
@@ -1062,7 +1062,7 @@ void prepare_move()
else if(abs(axis_diff[0]) > 0 || abs(axis_diff[1]) > 0) { //X or Y or both
xy_d = sqrt(axis_diff[0] * axis_diff[0] + axis_diff[1] * axis_diff[1]);
//check if Z involved - if so interpolate that too
- d = (abs(axis_diff[2]>0))?sqrt(xy_d * xy_d + axis_diff[2] * axis_diff[2]):xy_d;
+ d = (abs(axis_diff[2])>0)?sqrt(xy_d * xy_d + axis_diff[2] * axis_diff[2]):xy_d;
}
else if(abs(axis_diff[3]) > 0)
d = abs(axis_diff[3]);