From 7a6dfdd36742600b493033cc722bd888e6ff9a6d Mon Sep 17 00:00:00 2001 From: Luca Toniolo <10792599+grandixximo@users.noreply.github.com> Date: Tue, 5 May 2026 17:19:49 +0800 Subject: [PATCH] axis -fix Z jog after touch off on unhomed lathe (#3994) ja_from_rbutton used the compact "xzabcuvw" letter map whenever the machine was unhomed, regardless of jog mode. Touch off forces teleop via set_motion_teleop(1), so a follow-up Z jog hit the teleop axis slot 1 (Y) instead of slot 2 (Z) and silently no-op'd. Gate the compact map on jjogmode so teleop axis jogs always use the full "xyzabcuvw" slot map. --- src/emc/usr_intf/axis/scripts/axis.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/emc/usr_intf/axis/scripts/axis.py b/src/emc/usr_intf/axis/scripts/axis.py index 3eff037ccea..030df49a72a 100755 --- a/src/emc/usr_intf/axis/scripts/axis.py +++ b/src/emc/usr_intf/axis/scripts/axis.py @@ -1936,7 +1936,11 @@ def ja_from_rbutton(): # radiobuttons for joints set ja_rbutton to numeric value [0,MAX_JOINTS) # radiobuttons for axes set ja_rbutton to one of: xyzabcuvw ja = vars.ja_rbutton.get() - if not all_homed() and lathe and not lathe_historical_config(): + jjogmode = get_jog_mode() + # "xzabcuvw" remap is only valid for joint jog on a lathe missing the Y + # joint. Teleop axis indices are fixed (0=X,1=Y,2=Z,...) so the full + # "xyzabcuvw" map must be used there, otherwise Z collides into the Y slot. + if jjogmode and not all_homed() and lathe and not lathe_historical_config(): axes = "xzabcuvw" else: axes = "xyzabcuvw" @@ -1950,7 +1954,7 @@ def ja_from_rbutton(): a = axes.index(ja) # letter specifies an axis coordinate # handle joint jogging for known identity kins - if get_jog_mode(): + if jjogmode: # joint jogging if lathe_historical_config(): a = "xyzabcuvw".index(ja)