Only send M105/M27 during sd printing when not currently heating up
parent
90a1edbbcf
commit
5b15d42881
|
@ -560,6 +560,7 @@ class MachineCom(object):
|
||||||
tempRequestTimeout = timeout
|
tempRequestTimeout = timeout
|
||||||
sdStatusRequestTimeout = timeout
|
sdStatusRequestTimeout = timeout
|
||||||
startSeen = not settings().getBoolean(["feature", "waitForStartOnConnect"])
|
startSeen = not settings().getBoolean(["feature", "waitForStartOnConnect"])
|
||||||
|
heatingUp = False
|
||||||
while True:
|
while True:
|
||||||
line = self._readline()
|
line = self._readline()
|
||||||
if line == None:
|
if line == None:
|
||||||
|
@ -606,10 +607,14 @@ class MachineCom(object):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
#If we are waiting for an M109 or M190 then measure the time we lost during heatup, so we can remove that time from our printing time estimate.
|
#If we are waiting for an M109 or M190 then measure the time we lost during heatup, so we can remove that time from our printing time estimate.
|
||||||
if not 'ok' in line and self._heatupWaitStartTime != 0:
|
if not 'ok' in line:
|
||||||
t = time.time()
|
heatingUp = True
|
||||||
self._heatupWaitTimeLost = t - self._heatupWaitStartTime
|
if self._heatupWaitStartTime != 0:
|
||||||
self._heatupWaitStartTime = t
|
t = time.time()
|
||||||
|
self._heatupWaitTimeLost = t - self._heatupWaitStartTime
|
||||||
|
self._heatupWaitStartTime = t
|
||||||
|
else:
|
||||||
|
heatingUp = False
|
||||||
|
|
||||||
##~~ SD Card handling
|
##~~ SD Card handling
|
||||||
elif 'SD init fail' in line:
|
elif 'SD init fail' in line:
|
||||||
|
@ -733,11 +738,11 @@ class MachineCom(object):
|
||||||
line = 'ok'
|
line = 'ok'
|
||||||
|
|
||||||
if self.isSdPrinting():
|
if self.isSdPrinting():
|
||||||
if time.time() > tempRequestTimeout:
|
if time.time() > tempRequestTimeout and not heatingUp:
|
||||||
self._sendCommand("M105")
|
self._sendCommand("M105")
|
||||||
tempRequestTimeout = time.time() + 5
|
tempRequestTimeout = time.time() + 5
|
||||||
|
|
||||||
if time.time() > sdStatusRequestTimeout:
|
if time.time() > sdStatusRequestTimeout and not heatingUp:
|
||||||
self._sendCommand("M27")
|
self._sendCommand("M27")
|
||||||
sdStatusRequestTimeout = time.time() + 1
|
sdStatusRequestTimeout = time.time() + 1
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue