Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bool PacketFinderBase::waitForPayloadAndEtx(const unsigned char * incoming, unsigned int numberOfIncoming, bool & foundPacket) #56

Open
tyw517369 opened this issue Mar 4, 2020 · 0 comments

Comments

@tyw517369
Copy link

I thank function waitForPayloadAndEtx need modify as below:

int j = 0;
for (unsigned int i = (size_stx + size_length_field + size_payload + size_checksum_field);
    i < (size_stx + size_length_field + size_payload + size_checksum_field + size_etx); i++)
{
  if(verbose)
  {
    printf("buffer[%d] =%02x  ETX[%d]=%02x\n", i, buffer[i], j, ETX[j]);
  }
  if (buffer[i] != ETX[j])
  {
    foundPacket = false;
  }
  j++;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant