verifyCrc static method
Verifies CRC of measurement data.
Uses CRC16-CCITT/XMODEM algorithm with initial value 0xFFFF. The CRC is calculated on measurement bytes only (block indices should be stripped first).
Implementation
static bool verifyCrc(Uint8List measurementData, int expectedCrc) {
if (expectedCrc == 0) return true; // No CRC provided
final computedCrc = calculateCrc(measurementData);
return computedCrc == expectedCrc;
}