From 731fa83083409612f8225426c68687a9b24b401a Mon Sep 17 00:00:00 2001 From: jneilliii Date: Mon, 3 Jul 2023 05:09:37 -0400 Subject: [PATCH 1/5] =?UTF-8?q?=F0=9F=90=9B=20GCV:=20Fix=20filename=20in?= =?UTF-8?q?=20rendering=20warning=20dialog=20(#4842)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #4841 --- .../plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2 b/src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2 index c18c190b3..3e3bff747 100644 --- a/src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2 +++ b/src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2 @@ -125,7 +125,7 @@

{{ _('Warning') }}

{% trans %}

- You've selected for printing which has a size of + You've selected for printing which has a size of . Depending on your machine this might be too large for rendering and cause your browser to become unresponsive or crash.

@@ -136,7 +136,7 @@

From c2515f62e3b6b479abe33935d0bd18f82c104986 Mon Sep 17 00:00:00 2001 From: Matthias Weis Date: Mon, 3 Jul 2023 11:27:26 +0200 Subject: [PATCH 2/5] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20deprecated=20service?= =?UTF-8?q?=20script=20example=20=20(#4840)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix deprecated service script example #4839 * add me to the Authors --------- Co-authored-by: Gina Häußge Closes #4839 --- AUTHORS.md | 1 + scripts/octoprint.service | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/AUTHORS.md b/AUTHORS.md index 150279e67..535abed6f 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -179,6 +179,7 @@ date of first contribution): * [Conny Rasch](https://github.com/CMR-DEV) * [Christopher Perrin](https://github.com/cperrin88) * [Martin Bartsch](https://github.com/kaenguruhs) + * [Matthias Weis](https://github.com/mad73923) OctoPrint started off as a fork of [Cura](https://github.com/daid/Cura) by [Daid Braam](https://github.com/daid). Parts of its communication layer and diff --git a/scripts/octoprint.service b/scripts/octoprint.service index ae5405c34..18322c574 100644 --- a/scripts/octoprint.service +++ b/scripts/octoprint.service @@ -8,7 +8,7 @@ Environment="LC_ALL=C.UTF-8" Environment="LANG=C.UTF-8" Type=exec User=pi -ExecStart=/home/pi/OctoPrint/venv/bin/octoprint +ExecStart=/home/pi/OctoPrint/venv/bin/octoprint serve [Install] WantedBy=multi-user.target From fba5f9073dd3281fbcbf91d7bc13064d4fbdf037 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 3 Jul 2023 14:00:58 +0200 Subject: [PATCH 3/5] =?UTF-8?q?=F0=9F=90=9B=20logging:=20Fix=20runtime=20s?= =?UTF-8?q?etting=20of=20level?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `loggerDict[logger]` might be a placeholder. `getLogger` takes care of replacing said placeholder with a full logger upon first access, before returning it. Closes #4753 --- src/octoprint/plugins/logging/__init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/octoprint/plugins/logging/__init__.py b/src/octoprint/plugins/logging/__init__.py index 82292aa8f..50fe5cd2c 100644 --- a/src/octoprint/plugins/logging/__init__.py +++ b/src/octoprint/plugins/logging/__init__.py @@ -234,10 +234,9 @@ class LoggingPlugin( # set runtime logging levels now for logger, level in new_levels.items(): - level = logging.getLevelName(level) - self._logger.info(f"Setting logger {logger} level to {level}") - self._logger.manager.loggerDict[logger].setLevel(level) + level_val = logging.getLevelName(level) + logging.getLogger(logger).setLevel(level_val) def _is_managed_logger(self, logger): return logger and (logger.startswith("octoprint") or logger.startswith("tornado")) From 78cacf6a0e5885a33559875c808dc308d9e79376 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 3 Jul 2023 17:57:48 +0200 Subject: [PATCH 4/5] =?UTF-8?q?=E2=9C=A8=20Add=20M115=20output=20to=20octo?= =?UTF-8?q?print.log?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implements #4586 --- src/octoprint/util/comm.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/octoprint/util/comm.py b/src/octoprint/util/comm.py index a4841b96b..dfcdd343c 100644 --- a/src/octoprint/util/comm.py +++ b/src/octoprint/util/comm.py @@ -2653,6 +2653,18 @@ class MachineCom: extra={"plugin": name}, ) + # log firmware capabilities + capability_list = "\n ".join( + [ + f"{capability}: {'supported' if enabled else 'not supported'}" + for capability, enabled in self._firmware_capabilities.items() + ] + ) + self._logger.info( + "Firmware sent the following capability report:\n " + + capability_list + ) + ##~~ position report processing if "X:" in line and "Y:" in line and "Z:" in line: parsed = parse_position_line(line) @@ -2862,6 +2874,7 @@ class MachineCom: self._logger.info( f'Printer reports firmware name "{firmware_name}"' ) + self._logger.info(f"Firmware info line: {line}") if self._firmware_detection: if ( From 7a8ebdfe2cba7e779c709b04eddf55ca63085f23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 3 Jul 2023 17:58:42 +0200 Subject: [PATCH 5/5] =?UTF-8?q?=E2=9C=A8=20Add=20reconstructed=20M115=20ou?= =?UTF-8?q?tput=20to=20systeminfo=20bundle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit New m115.txt gets generated from data stored in the comm layer. See #4586 --- src/octoprint/cli/systeminfo.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/octoprint/cli/systeminfo.py b/src/octoprint/cli/systeminfo.py index e8c4eca8a..5c94501d7 100644 --- a/src/octoprint/cli/systeminfo.py +++ b/src/octoprint/cli/systeminfo.py @@ -81,6 +81,25 @@ def get_systeminfo_bundle(systeminfo, logbase, printer=None, plugin_manager=None if hasattr(printer, "_log"): z.add(to_bytes("\n".join(printer._log)), arcname="terminal.txt") + # Add reconstructed M115 response, if available + if printer._comm and printer._comm._firmware_info: + comm = printer._comm + m115 = "Reconstructed M115 response:\n\n>>> M115\n<<< " + m115 += " ".join([f"{k}:{v}" for k, v in comm._firmware_info.items()]) + + if comm._firmware_capabilities: + m115 += ( + "\n<<< " + + "\n<<< ".join( + [ + f"Cap:{k}:{'1' if v else '0'}" + for k, v in comm._firmware_capabilities.items() + ] + ) + + "\n\n" + ) + z.add(to_bytes(m115), arcname="m115.txt") + # add systeminfo systeminfotxt = [] for k in sorted(systeminfo.keys()):