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
This commit is contained in:
kliment 2011-10-29 11:20:24 -07:00
commit 232b68baae

View file

@ -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]);