From 6b0dee26e53089c6543614c7152e2d4c34869a5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Thu, 5 Nov 2015 17:33:27 +0100 Subject: [PATCH] Interpret M25 as a pause when not printing from SD too --- src/octoprint/util/comm.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/octoprint/util/comm.py b/src/octoprint/util/comm.py index 9bc2c702..a0308fda 100644 --- a/src/octoprint/util/comm.py +++ b/src/octoprint/util/comm.py @@ -1701,6 +1701,12 @@ class MachineCom(object): return None, # Don't send the M0 or M1 to the machine, as M0 and M1 are handled as an LCD menu pause. _gcode_M1_queuing = _gcode_M0_queuing + def _gcode_M25_queuing(self, cmd, cmd_type=None): + # M25 while not printing from SD will be handled as pause. This way it can be used as another marker + # for GCODE induced pausing. Send it to the printer anyway though. + if self.isPrinting() and not self.isSdPrinting(): + self.setPause(True) + def _gcode_M104_sent(self, cmd, cmd_type=None): toolNum = self._currentTool toolMatch = regexes_parameters["intT"].search(cmd)