Reset currentLine when changing state to printing
This keeps gcodePos and current line in sync when changing status to "Printing"master
parent
45419422d7
commit
5e22b4b096
|
@ -486,6 +486,9 @@ class MachineCom(object):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
commandToSend = cmd
|
commandToSend = cmd
|
||||||
|
if "M110" in cmd:
|
||||||
|
pass
|
||||||
|
else:
|
||||||
self._currentLine += 1
|
self._currentLine += 1
|
||||||
if sendChecksum or self._alwaysSendChecksum:
|
if sendChecksum or self._alwaysSendChecksum:
|
||||||
lineNumber = self._gcodePos
|
lineNumber = self._gcodePos
|
||||||
|
@ -558,6 +561,7 @@ class MachineCom(object):
|
||||||
return
|
return
|
||||||
self._gcodeList = gcodeList
|
self._gcodeList = gcodeList
|
||||||
self._gcodePos = 0
|
self._gcodePos = 0
|
||||||
|
self._currentLine = 0
|
||||||
self._printStartTime100 = None
|
self._printStartTime100 = None
|
||||||
self._printSection = 'CUSTOM'
|
self._printSection = 'CUSTOM'
|
||||||
self._changeState(self.STATE_PRINTING)
|
self._changeState(self.STATE_PRINTING)
|
||||||
|
|
Loading…
Reference in New Issue