Skip to content

Commit 14bcb5e

Browse files
committed
Add new interface
1 parent 8375182 commit 14bcb5e

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

pymycobot/common.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,10 @@ class ProtocolCode(object):
178178
MERCURY_SET_BASE_COORD = 0xF1
179179
MERCURY_SET_BASE_COORDS = 0xF2
180180
MERCURY_JOG_BASE_COORD = 0xF3
181+
182+
MERCURY_DRAG_TECH_SAVE = 0x70
183+
MERCURY_DRAG_TECH_EXECUTE = 0x71
184+
MERCURY_DRAG_TECH_PAUSE = 0x72
181185

182186
GET_BASE_COORDS = 0xF0
183187
BASE_TO_SINGLE_COORDS = 0xF1

pymycobot/mercury.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,18 @@ def jog_base_coord(self, axis, direction, speed):
315315
speed (_type_): _description_
316316
"""
317317
return self._mesg(ProtocolCode.MERCURY_JOG_BASE_COORD, axis, direction, speed)
318+
319+
def drag_tech_save(self):
320+
"""Start recording the dragging teaching point. In order to show the best sports effect, the recording time should not exceed 90 seconds."""
321+
return self._mesg(ProtocolCode.MERCURY_DRAG_TECH_SAVE)
322+
323+
def drag_tech_execute(self):
324+
"""Start dragging the teaching point and only execute it once."""
325+
return self._mesg(ProtocolCode.MERCURY_DRAG_TECH_EXECUTE)
326+
327+
def drag_tech_pause(self):
328+
"""Pause recording of dragging teaching point"""
329+
self._mesg(ProtocolCode.MERCURY_DRAG_TECH_PAUSE)
318330

319331

320332

0 commit comments

Comments
 (0)