generatePayloadChecksum static method
Implementation
static int generatePayloadChecksum(Uint8List payload) {
int checksum = 0;
for (int byte in payload) {
if (byte >= 0) {
checksum += byte;
} else {
checksum += 256 + byte;
}
}
return checksum;
}