summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--__init__.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/__init__.py b/__init__.py
index 7ad7227..c850ab5 100644
--- a/__init__.py
+++ b/__init__.py
@@ -274,6 +274,19 @@ class OctoXMPP(EventHandlerPlugin, SettingsPlugin):
def _job_abort(self):
return self._job_cancel()
+ def _cmd_home(self, msg, *axis):
+ axes = list(filter(lambda a: a in ('all', ) + self._printer.valid_axes, axis))
+ if (len(axes) == 0):
+ reply = "Specify one or more axes (x y z e) or 'all' to home."
+ elif (len(axes) > 0 and 'all' in axes):
+ axes = ['x', 'y', 'z', 'e']
+ reply = "Homing all axes..."
+ else:
+ reply = "Homing axes {}...".format(", ".join(axes))
+
+ self._printer.home(axes)
+ msg.reply(body=reply).send()
+
__plugin_name__ = "OctoXMPP"
__plugin_version__ = "0.2.0"