From 36e4d6f4e959a2f334c97eee219ca4b5bb2d9b4b Mon Sep 17 00:00:00 2001 From: sanjayk03-dev Date: Thu, 12 Dec 2024 00:51:38 +0530 Subject: [PATCH] disable homing a automatically --- src/pug/templates/control-view.pug | 2 +- src/py/bbctrl/Mach.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pug/templates/control-view.pug b/src/pug/templates/control-view.pug index e1c5462..318d5fa 100644 --- a/src/pug/templates/control-view.pug +++ b/src/pug/templates/control-view.pug @@ -179,7 +179,7 @@ script#control-view-template(type="text/x-template") @click=`zero('${axis}')`, style="height:60px;width:60px") .fa.fa-map-marker - button.pure-button(:disabled="!is_idle", @click=`home('${axis}')`, + button.pure-button(:disabled="!is_idle && axis == 'a'", @click=`home('${axis}')`, title=`Home {{'${axis}' | upper}} axis.`, style="height:60px;width:60px") .fa.fa-home diff --git a/src/py/bbctrl/Mach.py b/src/py/bbctrl/Mach.py index ef88de8..24e122c 100644 --- a/src/py/bbctrl/Mach.py +++ b/src/py/bbctrl/Mach.py @@ -276,7 +276,9 @@ class Mach(Comm): def home(self, axis, position = None): state = self.ctrl.state - if axis is None: axes = 'zxyabc' # TODO This should be configurable + if axis is None: + is_rotary_active = state.get('2an', None) == 3 + axes = 'zxybc' if is_rotary_active else 'zxyabc' # TODO This should be configurable else: axes = '%c' % axis for axis in axes: