Only apply the temperature offset if the temperature being set from the GCODE isn't 0 ("heaters off")

This commit is contained in:
Gina Häußge committed 2013-11-18 11:35:38 +01:00
1 parent 4d2213544e
commit 297d101f5f
1 file changed
+3 -2
+3 -2
View File
@@ -1178,8 +1178,9 @@ class PrintingGcodeFileInformation(PrintingFileInformation):
try:
temp = float(tempMatch.group(2))
newTemp = temp + offset
line = line.replace("S" + tempMatch.group(2), "S%f" % newTemp)
if temp > 0:
newTemp = temp + offset
line = line.replace("S" + tempMatch.group(2), "S%f" % newTemp)
except ValueError:
pass
return line