Skip to content

Commit 55a2835

Browse files
committed
gmoccapy -can submit the current MDI command from HALUI
Pressing HALUI's cycle start when in MDI mode will call the current MDI command in gmoccapy's MDI history widget.
1 parent 9a7bfe2 commit 55a2835

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/emc/usr_intf/gmoccapy/gmoccapy.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1359,12 +1359,21 @@ def _make_joints_button(self):
13591359

13601360
self.joints_button_dic[name] = btn
13611361

1362+
# halui/external cycle start request
13621363
def request_start(self,data):
1363-
print('start')
1364-
self.widgets.btn_run.emit('clicked')
1364+
print('start request')
1365+
if self.stat.task_mode == linuxcnc.MODE_MDI:
1366+
print('Submit MDI')
1367+
self.widgets.hal_mdihistory.submit()
1368+
elif self.stat.task_mode == linuxcnc.MODE_MANUAL:
1369+
self._show_error((13, _("Can't start cycles or submit MDI commands in manual Mode")))
1370+
else:
1371+
print('Cycle Start')
1372+
self.widgets.btn_run.emit('clicked')
13651373

1374+
# halui/external pause request
13661375
def request_pause(self,data):
1367-
print('pause')
1376+
print('pause request')
13681377
self.widgets.tbtn_pause.emit('clicked')
13691378

13701379
# call INI macro (from hal_glib message)

0 commit comments

Comments
 (0)