🐛 Only detect sd printing on byte pos change
Should fix #3301, or at least make it way less likely to happen. The problem seems to have been made worse by `M25` not being blocking on Klipper and thus the SD printing not being guaranteed to have stopped yet after its return, meaning the following `M26 S0` will be denied, causing the file position to not be properly reset and hence the issue to arise in the first place.
This commit is contained in:
1 parent
2c930ef069
commit
1d60250942
1 file changed
+8
-1
@@ -2053,7 +2053,12 @@ class MachineCom(object):
|
||||
else:
|
||||
self._consecutive_not_sd_printing = 0
|
||||
if self.isSdFileSelected():
|
||||
if not self.isSdPrinting() and current != total and current > 0:
|
||||
|
||||
# If we are not yet sd printing, the current does not equal the total, is larger
|
||||
# than zero and has increased since the last time we saw a position report, then
|
||||
# yes, this looks like we just started printing due to an external trigger.
|
||||
if not self.isSdPrinting() and current != total and current > 0 \
|
||||
and self._currentFile and current > self._currentFile.pos:
|
||||
self.startPrint(external_sd=True)
|
||||
|
||||
self._currentFile.pos = current
|
||||
@@ -2509,6 +2514,8 @@ class MachineCom(object):
|
||||
if self._busy_protocol_support:
|
||||
self._set_busy_protocol_interval()
|
||||
|
||||
self._consecutive_not_sd_printing = 0
|
||||
|
||||
def _get_temperature_timer_interval(self):
|
||||
busy_default = 4.0
|
||||
target_default = 2.0
|
||||
|
||||
Reference in new issue
Block a user