checkCRC16 static method
Implementation
static bool checkCRC16(Uint8List bytes) {
try {
int crc16 = CRCUtils.calculateCRC16(bytes.sublist(0, bytes.length - 2));
return bytes[bytes.length - 2] == ((crc16 >> 8) & 0xFF) &&
bytes[bytes.length - 1] == (crc16 & 0xFF);
} catch (e) {
return false;
}
}