Skip to content

Commit 6f69ef5

Browse files
committed
[fix] add parameter hardware_version in get_vacuum_gripper
1 parent 6c8c2d5 commit 6f69ef5

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

doc/api/xarm_api.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1664,10 +1664,13 @@ xArm-Python-SDK API Documentation (V1.14.6): class XArmAPI in module xarm.wrappe
16641664
>         6: save failed
16651665
16661666

1667-
#### def __get_vacuum_gripper__(self):
1667+
#### def __get_vacuum_gripper__(self, hardware_version=1):
16681668

16691669
> Get vacuum gripper state
16701670
>
1671+
> :param hardware_version: hardware version
1672+
>     1: Plug-in Connection, default
1673+
>     2: Contact Connection
16711674
> :return: tuple((code, state)), only when code is 0, the returned result is correct.
16721675
>     code: See the [API Code Documentation](./xarm_api_code.md#api-code) for details.
16731676
>     state: suction cup state

xarm/wrapper/xarm_api.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1913,17 +1913,20 @@ def get_tgpio_analog(self, ionum=None):
19131913
"""
19141914
return self._arm.get_tgpio_analog(ionum)
19151915

1916-
def get_vacuum_gripper(self):
1916+
def get_vacuum_gripper(self, hardware_version=1):
19171917
"""
19181918
Get vacuum gripper state
19191919
1920+
:param hardware_version: hardware version
1921+
1: Plug-in Connection, default
1922+
2: Contact Connection
19201923
:return: tuple((code, state)), only when code is 0, the returned result is correct.
19211924
code: See the [API Code Documentation](./xarm_api_code.md#api-code) for details.
19221925
state: suction cup state
19231926
0: suction cup is off
19241927
1: suction cup is on
19251928
"""
1926-
return self._arm.get_suction_cup()
1929+
return self._arm.get_suction_cup(hardware_version=hardware_version)
19271930

19281931
def set_vacuum_gripper(self, on, wait=False, timeout=3, delay_sec=None, sync=True, hardware_version=1):
19291932
"""

0 commit comments

Comments
 (0)