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.
This commit is contained in:
Gina Häußge 2015-12-17 10:44:43 +01:00
parent 54f24b43f0
commit 570c66b6f3

View file

@ -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()