-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
I made some changes to this method:
bool Peripheral::checkCrc(unsigned char *data)
{
unsigned int size = 6 + data[3];
unsigned char crc = data[size-2], currentCRC = 0;
for(unsigned int i = 1 ; i < size - 1 ; i ++)
{
currentCRC += data[i];
}
currentCRC = ~currentCRC;
if(currentCRC == crc)
return true;
else return false;
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels