Skip to content

Commit

Permalink
Address issue #73
Browse files Browse the repository at this point in the history
  • Loading branch information
PowerBroker2 authored Aug 6, 2021
1 parent 3367a6f commit e120f43
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Packet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ uint8_t Packet::parse(const uint8_t& recChar, const bool& valid)
if ((recChar > 0) && (recChar <= MAX_PACKET_SIZE))
{
bytesToRec = recChar;
payIndex = 0;
state = find_payload;
}
else
Expand All @@ -192,10 +193,7 @@ uint8_t Packet::parse(const uint8_t& recChar, const bool& valid)
payIndex++;

if (payIndex == bytesToRec)
{
payIndex = 0;
state = find_crc;
}
}
break;
}
Expand Down

0 comments on commit e120f43

Please sign in to comment.