Skip to content

Commit 69d26ee

Browse files
authored
Merge pull request #3667 from Sigma1912/Gmoccapy_fix-homing-bug-on-focus-out-event
gmoccapy: fix homing abort on focus out event
2 parents 1a433e6 + 42e27e7 commit 69d26ee

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/emc/usr_intf/gmoccapy/gmoccapy.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3175,13 +3175,16 @@ def on_window1_destroy(self, widget, data=None):
31753175
Gtk.main_quit()
31763176

31773177
def on_focus_out(self, widget, data=None):
3178+
LOG.debug("focus-out-event")
31783179
self.stat.poll()
31793180
if self.stat.enabled and self.stat.task_mode == linuxcnc.MODE_MANUAL and self.stat.current_vel > 0:
31803181
# cancel any joints jogging
31813182
JOGMODE = self._get_jog_mode()
31823183
for jnum in range(self.stat.joints):
3183-
self.command.jog(linuxcnc.JOG_STOP, JOGMODE, jnum)
3184-
LOG.debug("Stopped jogging on focus-out-event")
3184+
# don't cancel if the joint is homing
3185+
if not self.stat.joint[jnum]["homing"]:
3186+
self.command.jog(linuxcnc.JOG_STOP, JOGMODE, jnum)
3187+
LOG.debug("Stopped jogging for joint %d on focus-out-event" % (jnum))
31853188

31863189
# What to do if a macro button has been pushed
31873190
def _on_btn_macro_pressed( self, widget = None, data = None ):

0 commit comments

Comments
 (0)