Skip to content

Commit 1a0c922

Browse files
committed
fixed bug removeStuffing
1 parent 171abd0 commit 1a0c922

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

python/src/dynamixel_sdk/protocol2_packet_handler.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,10 +197,9 @@ def removeStuffing(self, packet):
197197
packet[i + PKT_INSTRUCTION - 1] == 0xFF) and (packet[i + PKT_INSTRUCTION - 2] == 0xFF):
198198
# FF FF FD FD
199199
packet_length_out = packet_length_out - 1
200-
i += 1
201-
202-
packet[index] = packet[i + PKT_INSTRUCTION]
203-
index += 1
200+
else:
201+
packet[index] = packet[i + PKT_INSTRUCTION]
202+
index += 1
204203

205204
packet[index] = packet[PKT_INSTRUCTION + packet_length_in - 2]
206205
packet[index + 1] = packet[PKT_INSTRUCTION + packet_length_in - 1]

0 commit comments

Comments
 (0)