Fix for SharedNozzle, replicating temp from current tool to all tools. Issue # 2077
This commit is contained in:
parent
b161a1f093
commit
791f0457fb
2 changed files with 11 additions and 4 deletions
|
|
@ -81,6 +81,7 @@ date of first contribution):
|
|||
* [Shawn Bruce](https://github.com/kantlivelong)
|
||||
* [Claudiu Ceia] (https://github.com/ClaudiuCeia)
|
||||
* [Goswin von Brederlow](https://github.com/mrvn)
|
||||
* [Luke McKechnie](https://github.com/galamdring)
|
||||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -1130,7 +1130,7 @@ class MachineCom(object):
|
|||
def _processTemperatures(self, line):
|
||||
current_tool = self._currentTool if self._currentTool is not None else 0
|
||||
maxToolNum, parsedTemps = parse_temperature_line(line, current_tool)
|
||||
|
||||
# self._logger.info("current_tool: %d, maxToolNum: %d, parsedTemps: %s"%(current_tool,maxToolNum,parsedTemps))
|
||||
for name, hook in self._temperature_hooks.items():
|
||||
try:
|
||||
parsedTemps = hook(self, parsedTemps)
|
||||
|
|
@ -1139,13 +1139,19 @@ class MachineCom(object):
|
|||
except:
|
||||
self._logger.exception("Error while processing temperatures in {}, skipping".format(name))
|
||||
|
||||
if "T0" in parsedTemps.keys():
|
||||
printer_profile=self._printerProfileManager.get_current_or_default()
|
||||
shared_nozzle = printer_profile["extruder"]["sharedNozzle"]
|
||||
|
||||
if "T%d"%current_tool in parsedTemps.keys():
|
||||
for n in range(maxToolNum + 1):
|
||||
tool = "T%d" % n
|
||||
if not tool in parsedTemps.keys():
|
||||
if not tool in parsedTemps.keys() and not shared_nozzle:
|
||||
continue
|
||||
elif not tool in parsedTemps.keys() and shared_nozzle:
|
||||
actual, target = parsedTemps["T%d"%current_tool]
|
||||
|
||||
actual, target = parsedTemps[tool]
|
||||
else:
|
||||
actual, target = parsedTemps[tool]
|
||||
self.last_temperature.set_tool(n, actual=actual, target=target)
|
||||
|
||||
# bed temperature
|
||||
|
|
|
|||
Loading…
Reference in a new issue