Fix filament measurement for relative extruders

master
Václav 'Ax' Hůla 2013-03-01 17:55:25 +01:00
parent c015a67a70
commit d667a0ff56
1 changed files with 5 additions and 2 deletions

View File

@ -159,8 +159,11 @@ class gcode(object):
moveType = 'extrude' moveType = 'extrude'
if e < 0: if e < 0:
moveType = 'retract' moveType = 'retract'
totalExtrusion += e - currentE if posAbsExtruder:
currentE = e totalExtrusion += e - currentE
currentE = e
else:
totalExtrusion += e
if totalExtrusion > maxExtrusion: if totalExtrusion > maxExtrusion:
maxExtrusion = totalExtrusion maxExtrusion = totalExtrusion
if moveType == 'move' and oldPos.z != pos.z: if moveType == 'move' and oldPos.z != pos.z: