summaryrefslogtreecommitdiff
path: root/Sprinter
diff options
context:
space:
mode:
authorkliment <kliment.yanev@gmail.com>2011-10-29 11:20:24 -0700
committerkliment <kliment.yanev@gmail.com>2011-10-29 11:20:24 -0700
commit232b68baae84723706e6b399cdf0886ccc6e54c2 (patch)
tree9e9c16fd35782701eef7f48684efa05781143a0f /Sprinter
parent038ab7803e76138148aedfe00c9850d5aba36488 (diff)
parent67b81e0881b8ba7e9029d89c5819d6a80914a178 (diff)
Merge pull request #110 from barclayo/patch-1
Fix d calculation on XYZ moves where comparison was inside of abs() instead of comparing with the absolute value
Diffstat (limited to 'Sprinter')
-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]);