From ad201b040d3d76a8de8177de563deaff20894476 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Wed, 15 Jun 2016 16:27:51 +0200 Subject: [PATCH] Don't parse B: in position as bed temperature Closes #1373 --- src/octoprint/util/comm.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/octoprint/util/comm.py b/src/octoprint/util/comm.py index 5d8d1c4a..dc88d71f 100644 --- a/src/octoprint/util/comm.py +++ b/src/octoprint/util/comm.py @@ -1046,8 +1046,17 @@ class MachineCom(object): if handled and self._state not in (self.STATE_CONNECTING, self.STATE_DETECT_BAUDRATE): continue - ##~~ Temperature processing - if ' T:' in line or line.startswith('T:') or ' T0:' in line or line.startswith('T0:') or ' B:' in line or line.startswith('B:'): + # position report processing + if 'X:' in line and 'Y:' in line and 'Z:' in line: + # currently only here to prevent any "B:"s in a position report from + # triggering temperature processing and being interpreted as a bed + # temperature - can happen with COREXY in current Marlin + # + # see also issue #1373 + pass + + # temperature processing + elif ' T:' in line or line.startswith('T:') or ' T0:' in line or line.startswith('T0:') or ((' B:' in line or line.startswith('B:')) and not 'A:' in line): if not disable_external_heatup_detection and not line.strip().startswith("ok") and not self._heating: self._logger.debug("Externally triggered heatup detected") self._heating = True