Skip to content
Snippets Groups Projects
Commit 1c779df3 authored by ROBOTIS-zerom's avatar ROBOTIS-zerom
Browse files

[Protocol2PacketHandler]

 - RxPacket packet length re-calculate bug fixed.
parent 9beb6d36
No related branches found
No related tags found
No related merge requests found
......@@ -330,7 +330,12 @@ int Protocol2PacketHandler::RxPacket(PortHandler *port, UINT8_T *rxpacket)
}
// re-calculate the exact length of the rx packet
_wait_length = DXL_MAKEWORD(rxpacket[PKT_LENGTH_L], rxpacket[PKT_LENGTH_H]) + PKT_LENGTH_H + 1;
if(_wait_length != DXL_MAKEWORD(rxpacket[PKT_LENGTH_L], rxpacket[PKT_LENGTH_H]) + PKT_LENGTH_H + 1)
{
_wait_length = DXL_MAKEWORD(rxpacket[PKT_LENGTH_L], rxpacket[PKT_LENGTH_H]) + PKT_LENGTH_H + 1;
continue;
}
if(_rx_length < _wait_length)
{
// check timeout
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment