From d7ae14776415e7e8a8e3fdffa48558d3d7af955c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Fri, 22 Jul 2016 09:46:58 +0200 Subject: [PATCH] Tickle printer on timeout when idle and blocked --- src/octoprint/util/comm.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/octoprint/util/comm.py b/src/octoprint/util/comm.py index dfc92c50..c43603e8 100644 --- a/src/octoprint/util/comm.py +++ b/src/octoprint/util/comm.py @@ -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()