Skip to content

Commit db07465

Browse files
committed
gmoccapy -update external pause/start behavior
fix pausing in MDI don't toggle pause (only pause not unpause) cycle start will unpause if paused
1 parent 6fb07d8 commit db07465

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

src/emc/usr_intf/gmoccapy/gmoccapy.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1362,7 +1362,9 @@ def _make_joints_button(self):
13621362
# halui/external cycle start request
13631363
def request_start(self,data):
13641364
print('start request')
1365-
if self.stat.task_mode == linuxcnc.MODE_MDI:
1365+
if self.GSTAT.is_auto_paused():
1366+
self.command.auto(linuxcnc.AUTO_RESUME)
1367+
elif self.stat.task_mode == linuxcnc.MODE_MDI:
13661368
print('Submit MDI')
13671369
self.widgets.hal_mdihistory.submit()
13681370
elif self.stat.task_mode == linuxcnc.MODE_MANUAL:
@@ -1374,7 +1376,15 @@ def request_start(self,data):
13741376
# halui/external pause request
13751377
def request_pause(self,data):
13761378
print('pause request')
1377-
self.widgets.tbtn_pause.emit('clicked')
1379+
1380+
# don't toggle
1381+
if self.GSTAT.is_auto_paused():
1382+
return
1383+
1384+
if self.stat.task_mode == linuxcnc.MODE_AUTO:
1385+
self.widgets.tbtn_pause.emit('clicked')
1386+
else:
1387+
self.command.auto(linuxcnc.AUTO_PAUSE)
13781388

13791389
# call INI macro (from hal_glib message)
13801390
def request_macro_call(self, data):

0 commit comments

Comments
 (0)