Don't prefix tool number for temperature command when only one extruder is present
Temporary workaround for #341
This commit is contained in:
parent
d0cb119bb0
commit
3bfaa33c58
1 changed files with 8 additions and 5 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue