From e94f789b727f554b33181aab2e5036bf92e722b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Tue, 21 May 2019 14:29:15 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Always=20report=20all=20tools=20?= =?UTF-8?q?in=20sharedNozzle=20setups?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #3177 See also https://community.octoprint.org/t/9620/4 --- src/octoprint/util/comm.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/octoprint/util/comm.py b/src/octoprint/util/comm.py index 9acc6272e..4b60ca2af 100644 --- a/src/octoprint/util/comm.py +++ b/src/octoprint/util/comm.py @@ -1542,6 +1542,8 @@ class MachineCom(object): current_tool_key = "T%d" % current_tool maxToolNum, parsedTemps = parse_temperature_line(line, current_tool) + maxToolNum = max(maxToolNum, self._printerProfileManager.get_current_or_default()["extruder"]["count"] - 1) + for name, hook in self._temperature_hooks.items(): try: parsedTemps = hook(self, parsedTemps) @@ -1551,7 +1553,7 @@ class MachineCom(object): self._logger.exception("Error while processing temperatures in {}, skipping".format(name), extra=dict(plugin=name)) - if current_tool_key in parsedTemps.keys(): + if current_tool_key in parsedTemps: shared_nozzle = self._printerProfileManager.get_current_or_default()["extruder"]["sharedNozzle"] for n in range(maxToolNum + 1): tool = "T%d" % n