Commit b45c3c9d authored by Guillaume Seguin's avatar Guillaume Seguin

Fix division by zero in gcoder duration estimator

parent 348f3aba
......@@ -383,7 +383,7 @@ class GCode(object):
currenttravel = math.hypot(x - lastx, y - lasty)
if f == lastf: # Feedrate hasn't changed, no acceleration/decceleration planned
moveduration = currenttravel / f
moveduration = currenttravel / f if f != 0 else 0.
else:
# FIXME: review this better
# this looks wrong : there's little chance that the feedrate we'll decelerate to is the previous feedrate
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment