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