diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a31255..79e283f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # ChangeLog for pymycobot +## v3.3.1 (2023-12-4) + +- release v3.3.1 +- fix bug + ## v3.3.0 (2023-11-9) - release v3.3.0 diff --git a/pymycobot/__init__.py b/pymycobot/__init__.py index 4c88da6..1c560a2 100644 --- a/pymycobot/__init__.py +++ b/pymycobot/__init__.py @@ -52,7 +52,7 @@ from pymycobot.mybuddyemoticon import MyBuddyEmoticon __all__.append("MyBuddyEmoticon") -__version__ = "3.3.0b0" +__version__ = "3.3.1" __author__ = "Elephantrobotics" __email__ = "weiquan.xu@elephantrobotics.com" __git_url__ = "https://github.com/elephantrobotics/pymycobot" diff --git a/pymycobot/mecharmsocket.py b/pymycobot/mecharmsocket.py index 8fcf4df..80e77b2 100644 --- a/pymycobot/mecharmsocket.py +++ b/pymycobot/mecharmsocket.py @@ -110,7 +110,12 @@ def _mesg(self, genre, *args, **kwargs): ProtocolCode.GET_FRESH_MODE, ProtocolCode.GET_GRIPPER_MODE, ProtocolCode.GET_ERROR_INFO, - ProtocolCode.GET_GPIO_IN + ProtocolCode.GET_GPIO_IN, + ProtocolCode.SetHTSGripperTorque, + ProtocolCode.GetHTSGripperTorque, + ProtocolCode.GetGripperProtectCurrent, + ProtocolCode.InitGripper, + ProtocolCode.SET_FOUR_PIECES_ZERO ]: return self._process_single(res) elif genre in [ProtocolCode.GET_ANGLES]: diff --git a/pymycobot/myarm.py b/pymycobot/myarm.py index aa75224..d74071f 100644 --- a/pymycobot/myarm.py +++ b/pymycobot/myarm.py @@ -109,8 +109,13 @@ def _mesg(self, genre, *args, **kwargs): ProtocolCode.GET_REFERENCE_FRAME, ProtocolCode.GET_FRESH_MODE, ProtocolCode.GET_GRIPPER_MODE, + ProtocolCode.GET_ERROR_INFO, ProtocolCode.SET_SSID_PWD, - ProtocolCode.GetHTSGripperTorque + ProtocolCode.SetHTSGripperTorque, + ProtocolCode.GetHTSGripperTorque, + ProtocolCode.GetGripperProtectCurrent, + ProtocolCode.InitGripper, + ProtocolCode.SET_FOUR_PIECES_ZERO ]: return self._process_single(res) elif genre in [ProtocolCode.GET_ANGLES]: diff --git a/pymycobot/myarmsocket.py b/pymycobot/myarmsocket.py index e870347..4fa5f99 100644 --- a/pymycobot/myarmsocket.py +++ b/pymycobot/myarmsocket.py @@ -110,7 +110,13 @@ def _mesg(self, genre, *args, **kwargs): ProtocolCode.GET_FRESH_MODE, ProtocolCode.GET_GRIPPER_MODE, ProtocolCode.GET_ERROR_INFO, - ProtocolCode.GET_GPIO_IN + ProtocolCode.GET_GPIO_IN, + ProtocolCode.SET_SSID_PWD, + ProtocolCode.SetHTSGripperTorque, + ProtocolCode.GetHTSGripperTorque, + ProtocolCode.GetGripperProtectCurrent, + ProtocolCode.InitGripper, + ProtocolCode.SET_FOUR_PIECES_ZERO ]: return self._process_single(res) elif genre in [ProtocolCode.GET_ANGLES]: diff --git a/pymycobot/mybuddy.py b/pymycobot/mybuddy.py index ba92f3d..e099e3d 100644 --- a/pymycobot/mybuddy.py +++ b/pymycobot/mybuddy.py @@ -158,9 +158,12 @@ def _mesg(self, genre, *args, **kwargs): ProtocolCode.GET_END_TYPE, ProtocolCode.GET_MOVEMENT_TYPE, ProtocolCode.GET_REFERENCE_FRAME, - ProtocolCode.GET_JOINT_MIN_ANGLE, - ProtocolCode.GET_JOINT_MAX_ANGLE, ProtocolCode.GET_FRESH_MODE, + ProtocolCode.SetHTSGripperTorque, + ProtocolCode.GetHTSGripperTorque, + ProtocolCode.GetGripperProtectCurrent, + ProtocolCode.InitGripper, + ProtocolCode.SET_FOUR_PIECES_ZERO # ProtocolCode.GET_SERVO_CURRENTS ]: return self._process_single(res) @@ -192,6 +195,8 @@ def _mesg(self, genre, *args, **kwargs): return r else: return res + elif genre in [ProtocolCode.GET_JOINT_MAX_ANGLE, ProtocolCode.GET_JOINT_MIN_ANGLE]: + return self._int2coord(res[0]) elif genre in [ProtocolCode.GET_SERVO_VOLTAGES, ProtocolCode.COLLISION]: return [self._int2coord(angle) for angle in res] else: diff --git a/pymycobot/mybuddysocket.py b/pymycobot/mybuddysocket.py index 8407c92..8e6cb95 100644 --- a/pymycobot/mybuddysocket.py +++ b/pymycobot/mybuddysocket.py @@ -118,7 +118,12 @@ def _mesg(self, genre, *args, **kwargs): ProtocolCode.GET_MOVEMENT_TYPE, ProtocolCode.GET_REFERENCE_FRAME, ProtocolCode.GET_JOINT_MIN_ANGLE, - ProtocolCode.GET_JOINT_MAX_ANGLE + ProtocolCode.GET_JOINT_MAX_ANGLE, + ProtocolCode.SetHTSGripperTorque, + ProtocolCode.GetHTSGripperTorque, + ProtocolCode.GetGripperProtectCurrent, + ProtocolCode.InitGripper, + ProtocolCode.SET_FOUR_PIECES_ZERO ]: return self._process_single(res) elif genre in [ProtocolCode.GET_ANGLES]: diff --git a/pymycobot/mycobot.py b/pymycobot/mycobot.py index e755581..1880f5e 100755 --- a/pymycobot/mycobot.py +++ b/pymycobot/mycobot.py @@ -125,7 +125,11 @@ def _res(self, real_command, has_reply, genre): ProtocolCode.GET_ERROR_INFO, ProtocolCode.GET_COMMUNICATE_MODE, ProtocolCode.SET_COMMUNICATE_MODE, - ProtocolCode.GetHTSGripperTorque + ProtocolCode.SetHTSGripperTorque, + ProtocolCode.GetHTSGripperTorque, + ProtocolCode.GetGripperProtectCurrent, + ProtocolCode.InitGripper, + ProtocolCode.SET_FOUR_PIECES_ZERO ]: return self._process_single(res) elif genre in [ProtocolCode.GET_ANGLES]: diff --git a/pymycobot/mycobotsocket.py b/pymycobot/mycobotsocket.py index ab2b3d6..6ab36b0 100644 --- a/pymycobot/mycobotsocket.py +++ b/pymycobot/mycobotsocket.py @@ -113,7 +113,12 @@ def _mesg(self, genre, *args, **kwargs): ProtocolCode.GET_ERROR_INFO, ProtocolCode.GET_GPIO_IN, ProtocolCode.GET_COMMUNICATE_MODE, - ProtocolCode.SET_COMMUNICATE_MODE + ProtocolCode.SET_COMMUNICATE_MODE, + ProtocolCode.SetHTSGripperTorque, + ProtocolCode.GetHTSGripperTorque, + ProtocolCode.GetGripperProtectCurrent, + ProtocolCode.InitGripper, + ProtocolCode.SET_FOUR_PIECES_ZERO ]: return self._process_single(res) elif genre in [ProtocolCode.GET_ANGLES]: diff --git a/pymycobot/mypalletizer.py b/pymycobot/mypalletizer.py index 01a7453..fdf1638 100644 --- a/pymycobot/mypalletizer.py +++ b/pymycobot/mypalletizer.py @@ -145,7 +145,12 @@ def _mesg(self, genre, *args, **kwargs): ProtocolCode.GET_BASIC_INPUT, ProtocolCode.GET_TOF_DISTANCE, ProtocolCode.GET_COMMUNICATE_MODE, - ProtocolCode.SET_COMMUNICATE_MODE + ProtocolCode.SET_COMMUNICATE_MODE, + ProtocolCode.SetHTSGripperTorque, + ProtocolCode.GetHTSGripperTorque, + ProtocolCode.GetGripperProtectCurrent, + ProtocolCode.InitGripper, + ProtocolCode.SET_FOUR_PIECES_ZERO ]: return self._process_single(res) elif genre in [ProtocolCode.GET_ANGLES]: diff --git a/pymycobot/mypalletizersocket.py b/pymycobot/mypalletizersocket.py index c9cade1..045e2fc 100644 --- a/pymycobot/mypalletizersocket.py +++ b/pymycobot/mypalletizersocket.py @@ -106,7 +106,12 @@ def _mesg(self, genre, *args, **kwargs): ProtocolCode.GET_TOF_DISTANCE, ProtocolCode.GET_GPIO_IN, ProtocolCode.GET_COMMUNICATE_MODE, - ProtocolCode.SET_COMMUNICATE_MODE + ProtocolCode.SET_COMMUNICATE_MODE, + ProtocolCode.SetHTSGripperTorque, + ProtocolCode.GetHTSGripperTorque, + ProtocolCode.GetGripperProtectCurrent, + ProtocolCode.InitGripper, + ProtocolCode.SET_FOUR_PIECES_ZERO ]: return self._process_single(res) elif genre in [ProtocolCode.GET_ANGLES]: