Skip to content

Commit 5977f26

Browse files
committed
gmoccapy -add gstat message control of start and pause
1 parent 29e2973 commit 5977f26

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/emc/usr_intf/gmoccapy/gmoccapy.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,8 @@ def __init__(self, argv):
419419
self.GSTAT.connect("graphics-gcode-properties", self.on_gcode_properties)
420420
self.GSTAT.connect("file-loaded", self.on_hal_status_file_loaded)
421421
self.GSTAT.connect('macro-call-request', lambda w, name: self.request_macro_call(name))
422+
self.GSTAT.connect('cycle-start-request', lambda w, state :self.request_start(state))
423+
self.GSTAT.connect('cycle-pause-request', lambda w, state: self.request_pause(state))
422424

423425
# get if run from line should be used
424426
self.run_from_line = self.prefs.getpref("run_from_line", "no_run", str)
@@ -1352,6 +1354,14 @@ def _make_joints_button(self):
13521354

13531355
self.joints_button_dic[name] = btn
13541356

1357+
def request_start(self,data):
1358+
print('start')
1359+
self.widgets.btn_run.emit('clicked')
1360+
1361+
def request_pause(self,data):
1362+
print('pause')
1363+
self.widgets.tbtn_pause.emit('clicked')
1364+
13551365
# call INI macro (from hal_glib message)
13561366
def request_macro_call(self, data):
13571367
# if MDI command change to MDI and run

0 commit comments

Comments
 (0)