Skip to content

Commit

Permalink
release v3.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
anla-xu committed Dec 9, 2022
1 parent df4dd44 commit 1f4a291
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# ChangeLog for pymycobot

## v3.0.1 (2022-12-9)

- release v3.0.1
- Fix MyBuddy interface problems: get_base_coords()
- Add mybuddy serial port to read logs

## v3.0.0 (2022-12-9)

- release v3.0.0
Expand Down
2 changes: 1 addition & 1 deletion pymycobot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
from pymycobot.mybuddyemoticon import MyBuddyEmoticon
__all__.append("MyBuddyEmoticon")

__version__ = "3.0.0"
__version__ = "3.0.1"
__author__ = "Elephantrobotics"
__email__ = "[email protected]"
__git_url__ = "https://github.com/elephantrobotics/pymycobot"
Expand Down
10 changes: 9 additions & 1 deletion pymycobot/mybuddy.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ def _read(self):
break
else:
datas = None
self.log.debug("_read: {}".format(datas))
return datas

def _mesg(self, genre, *args, **kwargs):
Expand Down Expand Up @@ -170,11 +171,18 @@ def _mesg(self, genre, *args, **kwargs):
return self._int2angle(res[0]) if res else None
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]:
if res:
r = []
r = []
for idx in range(3):
r.append(self._int2coord(res[idx]))
for idx in range(3, 6):
r.append(self._int2angle(res[idx]))
if len(res) == 12:
r1 = []
for idx in range(6, 9):
r1.append(self._int2coord(res[idx]))
for idx in range(9, 12):
r1.append(self._int2angle(res[idx]))
return [r, r1]
return r
else:
return res
Expand Down

0 comments on commit 1f4a291

Please sign in to comment.