Skip to content

Commit 65b7716

Browse files
committed
release v3.2.3
1 parent d7e8c08 commit 65b7716

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

CHANGELOG.md

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

3+
## v3.2.3 (2023-10-20)
4+
5+
- release v3.2.3
6+
- Optimize myagv interface get_battery_info
7+
38
## v3.2.2 (2023-10-17)
49

510
- release v3.2.2

pymycobot/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
from pymycobot.mybuddyemoticon import MyBuddyEmoticon
5353
__all__.append("MyBuddyEmoticon")
5454

55-
__version__ = "3.2.2"
55+
__version__ = "3.2.3"
5656
__author__ = "Elephantrobotics"
5757
__email__ = "weiquan.xu@elephantrobotics.com"
5858
__git_url__ = "https://github.com/elephantrobotics/pymycobot"

pymycobot/myagv.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,17 @@ def _mesg(self, genre, *args, **kwargs):
135135
return self._decode_int16(data[4:6])
136136
elif ProtocolCode.GET_BATTERY_INFO.value:
137137
byte_1 = bin(data[4])[2:]
138+
res =[]
138139
while len(byte_1) != 6:
139140
byte_1 = "0"+byte_1
140-
return [byte_1, self._int2coord(data[5]), self._int2coord(data[6])]
141+
res.append(byte_1)
142+
res.append(self._int2coord(data[5]))
143+
res.append(self._int2coord(data[6]))
144+
if byte_1[0] == "0":
145+
res[-1] = 0
146+
elif byte_1[1] == "0":
147+
res[1] = 0
148+
return res
141149
# print(res)
142150
return None
143151

0 commit comments

Comments
 (0)