I just noticed there is a bug in the checkCRC function.
The last line should be:
return (received_crc == calculated_crc);
and not:
return (received_crc = calculated_crc);
Otherwise the function always returns true regardless of whether the CRC is correct or not.
Hi,
I just noticed there is a bug in the checkCRC function. The last line should be: return (received_crc == calculated_crc); and not: return (received_crc = calculated_crc); Otherwise the function always returns true regardless of whether the CRC is correct or not.
Regards.