kobuki_core icon indicating copy to clipboard operation
kobuki_core copied to clipboard

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

Open tyw517369 opened this issue 5 years ago • 0 comments

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++;
}

tyw517369 avatar Mar 04 '20 02:03 tyw517369