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 1a308a1bc7
This commit is contained in:
Gina Häußge 2016-03-11 18:01:22 +01:00
parent 5cadf85401
commit e6f9003549

View file

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