summaryrefslogtreecommitdiff
path: root/Sprinter
diff options
context:
space:
mode:
authormidopple <mdoppler@gmx.at>2012-05-16 21:53:16 +0300
committermidopple <mdoppler@gmx.at>2012-05-16 21:53:16 +0300
commit18ad4ffc0e6b446e3475109089e6a0c9a75e2fab (patch)
tree9f9820a74e5d81bfabff1db514752544c722d08b /Sprinter
parentd651a6cb90a205b1ec203d756663a9ffdc9b485a (diff)
If a small move is drop and the next move is retract the speed is wrong calculated
see https://github.com/kliment/Sprinter/issues/170 thanks to jschleic
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 61f895b..4e0d6ff 100644
--- a/Sprinter/Sprinter.pde
+++ b/Sprinter/Sprinter.pde
@@ -2348,7 +2348,7 @@ void plan_buffer_line(float x, float y, float z, float e, float feed_rate)
delta_mm[Z_AXIS] = (target[Z_AXIS]-position[Z_AXIS])/axis_steps_per_unit[Z_AXIS];
delta_mm[E_AXIS] = (target[E_AXIS]-position[E_AXIS])/axis_steps_per_unit[E_AXIS];
- if ( block->steps_x == 0 && block->steps_y == 0 && block->steps_z == 0 ) {
+ if ( block->steps_x <= dropsegments && block->steps_y <= dropsegments && block->steps_z <= dropsegments ) {
block->millimeters = fabs(delta_mm[E_AXIS]);
} else {
block->millimeters = sqrt(square(delta_mm[X_AXIS]) + square(delta_mm[Y_AXIS]) + square(delta_mm[Z_AXIS]));