From 2c416eafc2527dc043a696806a36b211008c8e28 Mon Sep 17 00:00:00 2001 From: make-ing Date: Thu, 2 Jun 2016 14:43:20 +0200 Subject: [PATCH] added functionality to unlock the GUI when grbl is also unlocked with "$x" command --- src/octoprint/util/comm_acc2.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/octoprint/util/comm_acc2.py b/src/octoprint/util/comm_acc2.py index 30995ea5..609b9ef8 100644 --- a/src/octoprint/util/comm_acc2.py +++ b/src/octoprint/util/comm_acc2.py @@ -88,7 +88,7 @@ class MachineCom(object): self._finished_passes = 0 # regular expressions - self._regex_command = re.compile("^\s*\$?([GM]\d+|[TH])") + self._regex_command = re.compile("^\s*\$?([GM]\d+|[THX])") self._regex_feedrate = re.compile("F\d+", re.IGNORECASE) self._regex_intensity = re.compile("S\d+", re.IGNORECASE) @@ -755,6 +755,10 @@ class MachineCom(object): self._changeState(self.STATE_HOMING) return cmd + def _gcode_X_sent(self, cmd, cmd_type=None): + self._changeState(self.STATE_HOMING) # TODO: maybe change to seperate $X mode + return cmd + def _gcode_Hold_sent(self, cmd, cmd_type=None): self._changeState(self.STATE_PAUSED) return cmd