Only use T in temp command if num extruders is larger than 1 (instead of larger than 0)

This commit is contained in:
Jaime van Kessel 2016-12-14 09:51:15 +01:00
parent 763b853eca
commit 8f5d410ff6

View file

@ -468,7 +468,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice):
break # None is only returned when something went wrong. Stop listening
if time.time() > temperature_request_timeout:
if self._num_extruders > 0:
if self._num_extruders > 1:
self._temperature_requested_extruder_index = (self._temperature_requested_extruder_index + 1) % self._num_extruders
self.sendCommand("M105 T%d" % (self._temperature_requested_extruder_index))
else:
@ -524,7 +524,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice):
# Request the temperature on comm timeout (every 2 seconds) when we are not printing.)
if line == b"":
if self._num_extruders > 0:
if self._num_extruders > 1:
self._temperature_requested_extruder_index = (self._temperature_requested_extruder_index + 1) % self._num_extruders
self.sendCommand("M105 T%d" % self._temperature_requested_extruder_index)
else: