From: hg42@gmx.net Date: Mon, 13 Jan 2014 00:44:32 +0000 (+0100) Subject: while printing don't send real time commands (like M105) immediately, but queue them... X-Git-Tag: 14.02-RC1~17^2~3^2 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=05032d016162cf027b134020b1606b1d1edf1408;hp=-c;p=cura.git while printing don't send real time commands (like M105) immediately, but queue them instead --HG-- extra : source : 8f7db2333b68e63b518d12e709cd26a6ee9d335b --- 05032d016162cf027b134020b1606b1d1edf1408 diff --git a/Cura/util/machineCom.py b/Cura/util/machineCom.py index 5ade867e..7ac9333c 100644 --- a/Cura/util/machineCom.py +++ b/Cura/util/machineCom.py @@ -440,22 +440,22 @@ class MachineCom(object): if line == '': if self._extruderCount > 0: self._temperatureRequestExtruder = (self._temperatureRequestExtruder + 1) % self._extruderCount - self._sendCommand("M105 T%d" % (self._temperatureRequestExtruder)) + self.sendCommand("M105 T%d" % (self._temperatureRequestExtruder)) else: - self._sendCommand("M105") + self.sendCommand("M105") tempRequestTimeout = time.time() + 5 elif self._state == self.STATE_PRINTING: - if line == '' and time.time() > timeout: - self._log("Communication timeout during printing, forcing a line") - line = 'ok' #Even when printing request the temperature every 5 seconds. if time.time() > tempRequestTimeout: if self._extruderCount > 0: self._temperatureRequestExtruder = (self._temperatureRequestExtruder + 1) % self._extruderCount - self._sendCommand("M105 T%d" % (self._temperatureRequestExtruder)) + self.sendCommand("M105 T%d" % (self._temperatureRequestExtruder)) else: - self._sendCommand("M105") + self.sendCommand("M105") tempRequestTimeout = time.time() + 5 + if line == '' and time.time() > timeout: + self._log("Communication timeout during printing, forcing a line") + line = 'ok' if 'ok' in line: timeout = time.time() + 5 if not self._commandQueue.empty():