🥅 Prevent SD refresh while printing

Part 2 of fixing #4119
This commit is contained in:
Gina Häußge committed 2021-05-03 12:07:51 +02:00
1 parent 58fd13b238
commit 0cb987a8bd
2 files changed
+6 -2

No files matched your search

+5 -1
View File
@@ -15,7 +15,9 @@ Retrieve all files
Retrieve information regarding all files currently available and regarding the disk space still available
locally in the system. The results are cached for performance reasons. If you
want to override the cache, supply the query parameter ``force`` and set it to ``true``.
want to override the cache, supply the query parameter ``force`` and set it to ``true``. Note that
while printing a refresh/override of the cache for files stored on the printer's SD card
is disabled due to bandwidth restrictions on the serial interface.
By default only returns the files and folders in the root directory. If the query parameter ``recursive``
is provided and set to ``true``, returns all files and folders.
@@ -249,6 +251,8 @@ Retrieve files from specific location
Retrieve information regarding the files currently available on the selected `location` and -- if targeting
the ``local`` location -- regarding the disk space still available locally in the system. The results are cached for performance reasons. If you
want to override the cache, supply the query parameter ``force`` and set it to ``true``.
Note that while printing a refresh/override of the cache for files stored on the printer's SD card
is disabled due to bandwidth restrictions on the serial interface.
By default only returns the files and folders in the root directory. If the query parameter ``recursive``
is provided and set to ``true``, returns all files and folders.
+1 -1
View File
@@ -1086,7 +1086,7 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback):
self._comm.refreshSdFiles(
tags=kwargs.get("tags", set()) | {"trigger:printer.refresh_sd_files"}
)
if blocking:
if blocking and not self.is_printing():
self._sdFilelistAvailable.wait(kwargs.get("timeout", 10))
# ~~ state monitoring