From 3e94574a9bb4084250acd61a9bb3ed81e8d880d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 8 Jan 2024 15:03:07 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20virtual:=20remove=20wrong=20asse?= =?UTF-8?q?rtion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Was actually wrong to have that here, but thankfully it was implemented wrong as well, and here two wrongs made one right. To match existing firmware out there, we should be sending SD status auto reports with progress information whenever a print from a selected SD file has been started. If a such a print is cancelled via OctoPrint, all we can do is send an M25 to pause it and just never resume it. That means that the SD status will continue to report the current file position. See #4924 --- src/octoprint/plugins/virtual_printer/virtual.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/octoprint/plugins/virtual_printer/virtual.py b/src/octoprint/plugins/virtual_printer/virtual.py index dc0e3c74a..ca48e9507 100644 --- a/src/octoprint/plugins/virtual_printer/virtual.py +++ b/src/octoprint/plugins/virtual_printer/virtual.py @@ -1579,7 +1579,7 @@ class VirtualPrinter: self._newSdFilePos = pos def _reportSdStatus(self): - if self._sdPrinter is not None and self._sdPrintingSemaphore.is_set: + if self._sdPrinter is not None: self._send( f"SD printing byte {self._selectedSdFilePos}/{self._selectedSdFileSize}" )