From b4215c885c5ae967cf50df8161b3571c35a2334d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Fri, 11 Nov 2016 13:24:00 +0100 Subject: [PATCH] Support M114 responses without whitespace between coordinates Because apparently there exist some firmware variants/forks which don't have spaces between the coordinate entries. Who needs standards :) --- src/octoprint/util/comm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/octoprint/util/comm.py b/src/octoprint/util/comm.py index 1648ae85..9ea226cf 100644 --- a/src/octoprint/util/comm.py +++ b/src/octoprint/util/comm.py @@ -113,7 +113,7 @@ Groups will be as follows: * ``target``: new target temperature (float) """ -regex_position = re.compile("X:(?P{float})\s+Y:(?P{float})\s+Z:(?P{float})\s+E:(?P{float})".format(float=regex_float_pattern)) +regex_position = re.compile("X:(?P{float})\s*Y:(?P{float})\s*Z:(?P{float})\s*E:(?P{float})".format(float=regex_float_pattern)) """Regex for matching position reporting. Groups will be as follows: