Tickle printer on timeout when idle and blocked

This commit is contained in:
Gina Häußge 2016-07-22 09:46:58 +02:00
parent 9eb1485e84
commit d7ae147764

View file

@ -1340,6 +1340,13 @@ class MachineCom(object):
if self._sendCommand("M105", cmd_type="temperature"):
self._clear_to_send.set()
elif self._clear_to_send.blocked():
# timeout while idle and no oks left, let's try to tickle the printer
message = "Communication timeout while idle, trying to trigger response from printer."
self._logger.info(message)
self._log(message + " " + general_message)
self._clear_to_send.set()
def _track_heatup(self):
self._heating = True
self._heatupWaitStartTime = time.time()