diff --git a/octoprint/util/gcodeInterpreter.py b/octoprint/util/gcodeInterpreter.py index e272a1f..797d954 100644 --- a/octoprint/util/gcodeInterpreter.py +++ b/octoprint/util/gcodeInterpreter.py @@ -154,16 +154,15 @@ class gcode(object): moveType = 'extrude' if e < currentE: moveType = 'retract' + totalExtrusion += e - currentE + currentE = e else: if e > 0: moveType = 'extrude' if e < 0: moveType = 'retract' - if posAbsExtruder: - totalExtrusion += e - currentE - currentE = e - else: totalExtrusion += e + currentE += e if totalExtrusion > maxExtrusion: maxExtrusion = totalExtrusion if moveType == 'move' and oldPos.z != pos.z: