From a8ff23abe4e360fbcd17951d7276eb53f49b0b23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Tue, 15 Nov 2016 11:55:34 +0100 Subject: [PATCH] Also track F parameters in G28 commands --- src/octoprint/util/comm.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/octoprint/util/comm.py b/src/octoprint/util/comm.py index de7c8036..d4e43ee6 100644 --- a/src/octoprint/util/comm.py +++ b/src/octoprint/util/comm.py @@ -2218,6 +2218,16 @@ class MachineCom(object): pass _gcode_G1_sent = _gcode_G0_sent + def _gcode_G28_sent(self, cmd, cmd_type=None): + if "F" in cmd: + match = regexes_parameters["floatF"].search(cmd) + if match: + try: + f = float(match.group("value")) + self._currentF = f + except ValueError: + pass + def _gcode_M0_queuing(self, cmd, cmd_type=None): self.setPause(True) return None, # Don't send the M0 or M1 to the machine, as M0 and M1 are handled as an LCD menu pause.