From 29be1398030203222aa33d35d59213ff02ed7d8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 10 Mar 2014 14:40:01 +0100 Subject: [PATCH] Do not overwrite possibly existing target temp if only a single hotend is present See #360 --- src/octoprint/util/comm.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/octoprint/util/comm.py b/src/octoprint/util/comm.py index acb7b1ea..23b838f8 100644 --- a/src/octoprint/util/comm.py +++ b/src/octoprint/util/comm.py @@ -569,7 +569,14 @@ class MachineCom(object): if not "T0" in parsedTemps.keys() and "T" in parsedTemps.keys(): # only single reporting, "T" is our one and only extruder temperature toolNum, actual, target = parsedTemps["T"] - self._temp[0] = (actual, target) + + if target is not None: + self._temp[0] = (actual, target) + elif 0 in self._temp.keys() and self._temp[0] is not None and isinstance(self._temp[0], tuple): + (oldActual, oldTarget) = self._temp[0] + self._temp[0] = (actual, oldTarget) + else: + self._temp[0] = (actual, None) elif "T0" in parsedTemps.keys(): for n in range(maxToolNum + 1): tool = "T%d" % n