Skip to content

Commit b0359b5

Browse files
committed
Merge branch 'main' of github.com:elephantrobotics/pymycobot into mycobot_280_refactor
2 parents b205cab + 540c8a8 commit b0359b5

13 files changed

+17
-9
lines changed

pymycobot/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
from pymycobot.mybuddyemoticon import MyBuddyEmoticon
8686
__all__.append("MyBuddyEmoticon")
8787

88-
__version__ = "3.6.5"
88+
__version__ = "3.6.6"
8989
__author__ = "Elephantrobotics"
9090
__email__ = "weiquan.xu@elephantrobotics.com"
9191
__git_url__ = "https://github.com/elephantrobotics/pymycobot"

pymycobot/mecharm270.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ def _res(self, real_command, has_reply, genre):
147147
if genre == ProtocolCode.SET_SSID_PWD:
148148
return 1
149149
res = self._process_received(data, genre)
150+
if res is None:
151+
return None
150152
if res is not None and isinstance(res, list) and len(res) == 1 and genre not in [ProtocolCode.GET_BASIC_VERSION,
151153
ProtocolCode.GET_JOINT_MIN_ANGLE,
152154
ProtocolCode.GET_JOINT_MAX_ANGLE,

pymycobot/mecharmsocket.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def _mesg(self, genre, *args, **kwargs):
140140
if genre == ProtocolCode.SET_SSID_PWD:
141141
return 1
142142
res = self._process_received(data, genre)
143-
if res == []:
143+
if res is None:
144144
return None
145145
elif res is not None and isinstance(res, list) and len(res) == 1 and genre not in [
146146
ProtocolCode.GET_BASIC_VERSION,

pymycobot/myarmm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
class MyArmM(MyArmAPI):
88

9-
def __init__(self, port, baudrate="115200", timeout=0.1, debug=False):
9+
def __init__(self, port, baudrate="1000000", timeout=0.1, debug=False):
1010
super(MyArmM, self).__init__(port, baudrate, timeout,debug)
1111

1212
def set_joint_angle(self, joint_id, angle, speed):

pymycobot/mybuddy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def _mesg(self, genre, *args, **kwargs):
134134
if has_reply:
135135
data = self._read()
136136
res = self._process_received(data, genre, arm=12)
137-
if res == []:
137+
if res is None:
138138
return None
139139
if genre in [
140140
ProtocolCode.ROBOT_VERSION,

pymycobot/mybuddysocket.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def _mesg(self, genre, *args, **kwargs):
8686
if has_reply:
8787
data = self._read(genre, 'socket')
8888
res = self._process_received(data, genre, arm=12)
89-
if res == []:
89+
if res is None:
9090
return None
9191
if genre in [
9292
ProtocolCode.ROBOT_VERSION,

pymycobot/mycobot.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ def _res(self, real_command, has_reply, genre):
107107
if genre == ProtocolCode.SET_SSID_PWD:
108108
return None
109109
res = self._process_received(data, genre)
110+
if res is None:
111+
return None
110112
if res is not None and isinstance(res, list) and len(res) == 1:
111113
return res[0]
112114
if genre in [

pymycobot/mycobot280.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ def _res(self, real_command, has_reply, genre):
151151
if genre == ProtocolCode.SET_SSID_PWD:
152152
return 1
153153
res = self._process_received(data, genre)
154+
if res is None:
155+
return None
154156
if res is not None and isinstance(res, list) and len(res) == 1 and genre not in [ProtocolCode.GET_BASIC_VERSION,
155157
ProtocolCode.GET_JOINT_MIN_ANGLE,
156158
ProtocolCode.GET_JOINT_MAX_ANGLE,

pymycobot/mycobot280socket.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def _mesg(self, genre, *args, **kwargs):
144144
if genre == ProtocolCode.SET_SSID_PWD:
145145
return 1
146146
res = self._process_received(data, genre)
147-
if res == []:
147+
if res is None:
148148
return None
149149
elif res is not None and isinstance(res, list) and len(res) == 1 and genre not in [
150150
ProtocolCode.GET_BASIC_VERSION,

pymycobot/mycobot320.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,8 @@ def _res(self, real_command, has_reply, genre):
163163
if genre == ProtocolCode.SET_SSID_PWD:
164164
return 1
165165
res = self._process_received(data, genre)
166+
if res is None:
167+
return None
166168
if res is not None and isinstance(res, list) and len(res) == 1 and genre not in [ProtocolCode.GET_BASIC_VERSION,
167169
ProtocolCode.GET_JOINT_MIN_ANGLE,
168170
ProtocolCode.GET_JOINT_MAX_ANGLE,

0 commit comments

Comments
 (0)