From e6f900354921e0ef8caf3fec43f78f848b7097cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Fri, 11 Mar 2016 18:01:22 +0100 Subject: [PATCH] Reset line numbers before entering sd upload state Otherwise M110 N0 will not be processed to be prefixed with N0 and hence not reset the line numbers on the printer to 0. That was as bug in 1a308a1bc7094aaf4fe8c0b8f780d9eec0b9f335 --- 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 8dddf219..54ab12d6 100644 --- a/src/octoprint/util/comm.py +++ b/src/octoprint/util/comm.py @@ -658,10 +658,11 @@ class MachineCom(object): logging.info("Printer is not operation or busy") return + self.resetLineNumbers() + self._currentFile = StreamingGcodeFileInformation(filename, localFilename, remoteFilename) self._currentFile.start() - self.resetLineNumbers() self.sendCommand("M28 %s" % remoteFilename) eventManager().fire(Events.TRANSFER_STARTED, {"local": localFilename, "remote": remoteFilename}) self._callback.on_comm_file_transfer_started(remoteFilename, self._currentFile.getFilesize())