From ad3ae405f6ebbed067b09dbc521ce3edd2abc8c4 Mon Sep 17 00:00:00 2001 From: Salandora Date: Fri, 1 Jul 2016 18:25:52 +0200 Subject: [PATCH] Check for moveType == move instead of x,y,z is not None, otherwise x,y,z,e moves wouldn't be seen as extrude/retract moves (cherry picked from commit 1b6a46c) --- src/octoprint/util/gcodeInterpreter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/octoprint/util/gcodeInterpreter.py b/src/octoprint/util/gcodeInterpreter.py index 853cbfd6..b3c98dbe 100644 --- a/src/octoprint/util/gcodeInterpreter.py +++ b/src/octoprint/util/gcodeInterpreter.py @@ -151,7 +151,7 @@ class gcode(object): else: e = 0.0 - if x is not None or y is not None or z is not None: + if moveType == "move": diffX = oldPos[0] - pos[0] diffY = oldPos[1] - pos[1] totalMoveTimeMinute += math.sqrt(diffX * diffX + diffY * diffY) / feedRateXY