axis: fix Z jog after touch off on unhomed lathe (#3994)#4007
axis: fix Z jog after touch off on unhomed lathe (#3994)#4007grandixximo wants to merge 1 commit intoLinuxCNC:masterfrom
Conversation
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.
|
If this is good like this, will do also for 2.9 as #3994 also hits there |
|
Shouldn't the axis-->joint mapping be extracted from the INI-file set in [TRAJ]COORDINATES or the [KINS]KINEMATICS coordinates option? If neither is set, then a default can be used. Or am I looking at this wrongly? |
|
Two different lookups are involved: Letter to joint index (joint jog): yes, INI-driven. Line 1960 already uses Letter to teleop axis slot (teleop jog): not INI-driven. Slots 0..8 = XYZABCUVW are a hard-wired LinuxCNC convention. Other GUIs all hard-code the same The bug was that |
|
But, for example, a XXZZ machine has 4 joints (0=X, 1=X, 2=Z, 3=Z). How does that cope? |
|
Duplicate coordinate letters are an existing concern, not new to this PR. The behavior is unchanged either way: Teleop jog (letter to slot): still 9 fixed slots. Joint jog by letter: line 1960 uses Joint jog by letter, lathe unhomed, pre-fix: The PR doesn't change any of that. It only stops the compact joint-side map from leaking into the teleop path after |
|
Then this fix will confirm the status quo and be a narrow fix. I'm fine with that. The double/multiple axis name issue will need to be addressed consistently at some stage in all the UIs. Put it on the list ;-) |
Summary
Fixes #3994. Z axis stops jogging after touch off on an unhomed lathe with
[TRAJ]NO_FORCE_HOMING = 1.Cause
touch_off_system()callsset_motion_teleop(1)after the G10 L20 emit, putting motion in TELEOP.ja_from_rbutton()selected the compact"xzabcuvw"letter map whenever the machine was unhomed, which is correct for joint indices on a lathe (no Y joint) but wrong for teleop axis slots (fixed at 0=X, 1=Y, 2=Z, ...). After touch off the Z letter resolved to index 1, hitting the unused Y slot. X worked because index 0 matches in both maps.Fix
Gate the compact map on
jjogmode. Teleop axis jogs always use the full"xyzabcuvw"slot map; joint jogs keep the existing remap and trivkins/historical overrides.Test plan
NO_FORCE_HOMING = 1, do not home