Skip to content

Commit dd7c0ea

Browse files
committed
axis.py: stop continuous jogs if mdi tab #1519
candidate fix for #1519, lightly tested (master)
1 parent 68f883b commit dd7c0ea

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

  • src/emc/usr_intf/axis/scripts

src/emc/usr_intf/axis/scripts/axis.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ def General_Halt():
173173
mdi_history_index= -1
174174
resume_inhibit = 0
175175
continuous_jog_in_progress = False
176+
cjogindices = []
176177

177178
help1 = [
178179
("F1", _("Emergency stop")),
@@ -774,6 +775,14 @@ def update(self):
774775
del self.stat
775776
return
776777

778+
global continuous_jog_in_progress,cjogindices
779+
if continuous_jog_in_progress and not manual_tab_visible():
780+
jjogmode = get_jog_mode()
781+
for idx in cjogindices:
782+
c.jog(linuxcnc.JOG_STOP, jjogmode,idx)
783+
continuous_jog_in_progress = 0
784+
cjogindices = []
785+
777786
if ( (self.stat.motion_mode == linuxcnc.TRAJ_MODE_COORD)
778787
and (self.stat.task_mode == linuxcnc.MODE_MANUAL)
779788
):
@@ -3211,8 +3220,9 @@ def jog_on(a, b):
32113220
jog(linuxcnc.JOG_INCREMENT, jjogmode, a, b, distance)
32123221
jog_cont[a] = False
32133222
else:
3214-
global continuous_jog_in_progress
3223+
global continuous_jog_in_progress,cjogindices
32153224
continuous_jog_in_progress = True
3225+
if not a in cjogindices: cjogindices.append(a)
32163226
jog(linuxcnc.JOG_CONTINUOUS, jjogmode, a, b)
32173227
jog_cont[a] = True
32183228
jogging[a] = b

0 commit comments

Comments
 (0)