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 :)
This commit is contained in:
Gina Häußge 2016-11-11 13:24:00 +01:00
parent c8273785cd
commit b4215c885c

View file

@ -113,7 +113,7 @@ Groups will be as follows:
* ``target``: new target temperature (float)
"""
regex_position = re.compile("X:(?P<x>{float})\s+Y:(?P<y>{float})\s+Z:(?P<z>{float})\s+E:(?P<e>{float})".format(float=regex_float_pattern))
regex_position = re.compile("X:(?P<x>{float})\s*Y:(?P<y>{float})\s*Z:(?P<z>{float})\s*E:(?P<e>{float})".format(float=regex_float_pattern))
"""Regex for matching position reporting.
Groups will be as follows: