Don't prefix tool number for temperature command when only one extruder is present

Temporary workaround for #341
This commit is contained in:
Gina Häußge 2014-01-08 19:32:04 +01:00
parent d0cb119bb0
commit 3bfaa33c58

View file

@ -208,11 +208,14 @@ class Printer():
def setTemperature(self, type, value):
if type.startswith("tool"):
try:
toolNum = int(type[len("tool"):])
self.command("M104 T%d S%f" % (toolNum, value))
except ValueError:
pass
if settings().getInt(["printerParameters", "numExtruders"]) > 1:
try:
toolNum = int(type[len("tool"):])
self.command("M104 T%d S%f" % (toolNum, value))
except ValueError:
pass
else:
self.command("M104 S%f" % value)
elif type == "bed":
self.command("M140 S%f" % value)