Skip to content

Commit a5accd9

Browse files
committed
release v3.1.9
1 parent cd5a16b commit a5accd9

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# ChangeLog for pymycobot
22

3+
## v3.1.9 (2023-09-19)
4+
5+
- release v3.1.9
6+
- Fix bug
7+
8+
39
## v3.1.8 (2023-09-04)
410

511
- release v3.1.8

pymycobot/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
from pymycobot.mybuddyemoticon import MyBuddyEmoticon
4949
__all__.append("MyBuddyEmoticon")
5050

51-
__version__ = "3.1.9b3"
51+
__version__ = "3.1.9"
5252
__author__ = "Elephantrobotics"
5353
__email__ = "weiquan.xu@elephantrobotics.com"
5454
__git_url__ = "https://github.com/elephantrobotics/pymycobot"

pymycobot/cobotx.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,13 @@ def _mesg(self, genre, *args, **kwargs):
114114
return r
115115
elif genre == ProtocolCode.GO_ZERO:
116116
r = []
117-
if 1 not in res[1:]:
118-
return res[0]
119-
else:
120-
for i in range(1, len(res)):
121-
if res[i] == 1:
122-
r.append(i)
117+
if res:
118+
if 1 not in res[1:]:
119+
return res[0]
120+
else:
121+
for i in range(1, len(res)):
122+
if res[i] == 1:
123+
r.append(i)
123124
return r
124125
elif genre == ProtocolCode.COBOTX_GET_ANGLE:
125126
return self._int2angle(res)

0 commit comments

Comments
 (0)