Skip to content

Commit 20aaaa0

Browse files
committed
fix bug
1 parent 2c83e2c commit 20aaaa0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pymycobot/common.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,8 +393,10 @@ def _process_received(self, data, genre, arm=6):
393393
data_len = data[header_i + 2] - 3
394394

395395
unique_data = [ProtocolCode.GET_BASIC_INPUT, ProtocolCode.GET_DIGITAL_INPUT]
396-
397-
if cmd_id in unique_data and arm != 14:
396+
if unique_data == ProtocolCode.GET_DIGITAL_INPUT and arm == 14:
397+
data_pos = header_i + 4
398+
data_len -= 1
399+
elif cmd_id in unique_data:
398400
if arm == 12:
399401
data_pos = header_i + 6
400402
else:

0 commit comments

Comments
 (0)