Skip to content

Commit 1f4a291

Browse files
committed
release v3.0.1
1 parent df4dd44 commit 1f4a291

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
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.0.1 (2022-12-9)
4+
5+
- release v3.0.1
6+
- Fix MyBuddy interface problems: get_base_coords()
7+
- Add mybuddy serial port to read logs
8+
39
## v3.0.0 (2022-12-9)
410

511
- release v3.0.0

pymycobot/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
from pymycobot.mybuddyemoticon import MyBuddyEmoticon
4444
__all__.append("MyBuddyEmoticon")
4545

46-
__version__ = "3.0.0"
46+
__version__ = "3.0.1"
4747
__author__ = "Elephantrobotics"
4848
__email__ = "[email protected]"
4949
__git_url__ = "https://github.com/elephantrobotics/pymycobot"

pymycobot/mybuddy.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ def _read(self):
110110
break
111111
else:
112112
datas = None
113+
self.log.debug("_read: {}".format(datas))
113114
return datas
114115

115116
def _mesg(self, genre, *args, **kwargs):
@@ -170,11 +171,18 @@ def _mesg(self, genre, *args, **kwargs):
170171
return self._int2angle(res[0]) if res else None
171172
elif genre in [ProtocolCode.GET_ALL_BASE_COORDS, ProtocolCode.GET_COORDS, ProtocolCode.GET_TOOL_REFERENCE, ProtocolCode.GET_WORLD_REFERENCE, ProtocolCode.GET_BASE_COORDS, ProtocolCode.GET_BASE_COORD, ProtocolCode.BASE_TO_SINGLE_COORDS]:
172173
if res:
173-
r = []
174+
r = []
174175
for idx in range(3):
175176
r.append(self._int2coord(res[idx]))
176177
for idx in range(3, 6):
177178
r.append(self._int2angle(res[idx]))
179+
if len(res) == 12:
180+
r1 = []
181+
for idx in range(6, 9):
182+
r1.append(self._int2coord(res[idx]))
183+
for idx in range(9, 12):
184+
r1.append(self._int2angle(res[idx]))
185+
return [r, r1]
178186
return r
179187
else:
180188
return res

0 commit comments

Comments
 (0)