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

[Protocol1PacketHandler]

 - RxPacket packet length re-calculate bug fixed.
parent 1c779df3
No related branches found
No related tags found
No related merge requests found
...@@ -183,7 +183,12 @@ int Protocol1PacketHandler::RxPacket(PortHandler *port, UINT8_T *rxpacket) ...@@ -183,7 +183,12 @@ int Protocol1PacketHandler::RxPacket(PortHandler *port, UINT8_T *rxpacket)
} }
// re-calculate the exact length of the rx packet // re-calculate the exact length of the rx packet
_wait_length = rxpacket[PKT_LENGTH] + PKT_LENGTH + 1; if(_wait_length != rxpacket[PKT_LENGTH] + PKT_LENGTH + 1)
{
_wait_length = rxpacket[PKT_LENGTH] + PKT_LENGTH + 1;
continue;
}
if(_rx_length < _wait_length) if(_rx_length < _wait_length)
{ {
// check timeout // 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