Skip to content

Commit f6a1a0a

Browse files
committed
fix bug
1 parent 0534f21 commit f6a1a0a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

pymycobot/common.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,18 @@ def _process_received(self, data, genre, arm=6):
498498
res.append(self._decode_int16(one))
499499
i+=2
500500
return res
501+
elif data_len == 34:
502+
i = 0
503+
res = []
504+
while i < data_len:
505+
if i < 10 or i >= 26:
506+
res.append(valid_data[i])
507+
i+=1
508+
elif i < 26:
509+
one = valid_data[i : i + 2]
510+
res.append(self._decode_int16(one))
511+
i+=2
512+
return res
501513
else:
502514
if genre in [
503515
ProtocolCode.GET_SERVO_VOLTAGES,

0 commit comments

Comments
 (0)