🐛 paused action must not trigger *any* local processing
That includes sending M400 and M114 to capture the pause position. See MarlinFirmware/Marlin#13039
This commit is contained in:
1 parent
de6da3f360
commit
e67f72ce3d
3 files changed
+9
-19
No files matched your search
@@ -96,7 +96,7 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback):
|
||||
|
||||
#hook card upload
|
||||
self.sd_card_upload_hooks = plugin_manager().get_hooks("octoprint.printer.sdcardupload")
|
||||
|
||||
|
||||
# comm
|
||||
self._comm = None
|
||||
|
||||
@@ -669,7 +669,7 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback):
|
||||
if self._comm is None or not self._comm.isSdReady():
|
||||
return []
|
||||
return map(lambda x: (x[0][1:], x[1]), self._comm.getSdFiles())
|
||||
|
||||
|
||||
def add_sd_file(self, filename, path, on_success=None, on_failure=None, *args, **kwargs):
|
||||
if not self._comm or self._comm.isBusy() or not self._comm.isSdReady():
|
||||
self._logger.error("No connection to printer or printer is busy")
|
||||
@@ -1234,7 +1234,7 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback):
|
||||
thread.start()
|
||||
|
||||
def on_comm_print_job_paused(self, suppress_script=False, user=None):
|
||||
payload = self._payload_for_print_job_event(position=self._comm.pause_position.as_dict() if self._comm and self._comm.pause_position else None,
|
||||
payload = self._payload_for_print_job_event(position=self._comm.pause_position.as_dict() if self._comm and self._comm.pause_position and not suppress_script else None,
|
||||
action_user=user)
|
||||
if payload:
|
||||
eventManager().fire(Events.PRINT_PAUSED, payload)
|
||||
|
||||
@@ -1261,15 +1261,7 @@ class MachineCom(object):
|
||||
self._log("Did not receive parseable position data from printer within {}s, continuing without it".format(timeout))
|
||||
self._pause_preparation_done()
|
||||
|
||||
def _pause_preparation_done(self, check_timer=True, suppress_script=None, user=None):
|
||||
if suppress_script is None:
|
||||
with self._suppress_scripts_mutex:
|
||||
suppress_script = "pause" in self._suppress_scripts
|
||||
try:
|
||||
self._suppress_scripts.remove("pause")
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
def _pause_preparation_done(self, check_timer=True, suppress_script=False, user=None):
|
||||
if user is None:
|
||||
with self._action_users_mutex:
|
||||
try:
|
||||
@@ -1336,10 +1328,6 @@ class MachineCom(object):
|
||||
part_of_job=True,
|
||||
tags=tags | {"trigger:comm.set_pause", "trigger:pause"}) # pause print
|
||||
|
||||
if not local_handling:
|
||||
with self._suppress_scripts_mutex:
|
||||
self._suppress_scripts.add("pause")
|
||||
|
||||
def _on_M400_sent():
|
||||
# we don't call on_print_job_paused on our callback here
|
||||
# because we do this only after our M114 has been answered
|
||||
@@ -1360,7 +1348,7 @@ class MachineCom(object):
|
||||
"trigger:pause",
|
||||
"trigger:record_position"})
|
||||
|
||||
if self._log_position_on_pause:
|
||||
if self._log_position_on_pause and local_handling:
|
||||
with self._action_users_mutex:
|
||||
self._action_users["pause"] = user
|
||||
|
||||
|
||||
Reference in new issue
Block a user