From 076c6764a0fdbd649743c62a0badd8d7f24f17bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 23 Sep 2013 21:57:54 +0200 Subject: [PATCH] Properly restart sd prints Fixes #258 --- src/octoprint/util/comm.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/octoprint/util/comm.py b/src/octoprint/util/comm.py index df7088ec..612480d8 100644 --- a/src/octoprint/util/comm.py +++ b/src/octoprint/util/comm.py @@ -331,6 +331,7 @@ class MachineCom(object): if self._currentFile is None: raise ValueError("No file selected for printing") + wasPaused = self.isPaused() self._printSection = "CUSTOM" self._changeState(self.STATE_PRINTING) eventManager().fire("PrintStarted", self._currentFile.getFilename()) @@ -338,7 +339,7 @@ class MachineCom(object): try: self._currentFile.start() if self.isSdFileSelected(): - if self.isPaused(): + if wasPaused: self.sendCommand("M26 S0") self._currentFile.setFilepos(0) self.sendCommand("M24")