From 36c8f25fd1e34295d1a8ce917bbed78fdb65e83a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Wed, 17 Sep 2014 18:15:10 +0200 Subject: [PATCH] Honor paused state and don't eat the clear_for_send flag when not actually sending something --- src/octoprint/comm/protocol/reprap/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/octoprint/comm/protocol/reprap/__init__.py b/src/octoprint/comm/protocol/reprap/__init__.py index 517b457cc..c0e180698 100644 --- a/src/octoprint/comm/protocol/reprap/__init__.py +++ b/src/octoprint/comm/protocol/reprap/__init__.py @@ -397,7 +397,7 @@ class RepRapProtocol(Protocol): self._heatupDone() if self.is_printing() or self.is_streaming(): - if not self.is_sd_printing(): + if not self.is_sd_printing() and not self._state == State.PAUSED: self._send_next() if self._resend_delta is None and not self.is_streaming(): if time.time() > self._lastTemperatureUpdate + 5: @@ -657,6 +657,9 @@ class RepRapProtocol(Protocol): if with_checksum: self._last_lines.append(command) + else: + # reset clear for send flag, since we didn't send a command just now + self._clear_for_send.set() def _preprocess_command(self, command, with_checksum=False, with_line_number=None): if command is None: