From 570c66b6f30464d7e41ecd2f30bff9ef933dd017 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Thu, 17 Dec 2015 10:44:43 +0100 Subject: [PATCH] Trigger command processing on unknown commands We suffer from the same problem as commands being suppressed in the send queue here. If a non-GCODE-command we send to the printer produces no output, our _monitor loop will wait until the next response produced by another command. Which we won't send though since we are stuck waiting in the _monitor loop waiting for a response. Hence we need to manually trigger further command processing from the send loop here in order to ensure things keep going. --- src/octoprint/util/comm.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/octoprint/util/comm.py b/src/octoprint/util/comm.py index a384fb6d..02f8a9f8 100644 --- a/src/octoprint/util/comm.py +++ b/src/octoprint/util/comm.py @@ -1612,9 +1612,14 @@ class MachineCom(object): if gcode is not None: use_up_clear = True - # if we need to use up a clear, do that now if use_up_clear: + # if we need to use up a clear, do that now self._clear_to_send.clear() + else: + # Otherwise we need to tickle the read queue - there might not be a reply + # to this command, so our _monitor loop will stay waiting until timeout. We + # definitely do not want that, so we tickle the queue manually here + self._continue_sending() # now we just wait for the next clear and then start again self._clear_to_send.wait()