CheckSample(sampleBytes: array of bytes) : true / false
checkSum = 0
for i = 0 to 11
checksum = checksum + sampleBytes[i]
next i
/*通过and 0x7F取出来校验和*/
if (checksum & 0x7F) <> (sampleBytes[12] & 0x7F)
return false
else
return true
end if
asdf
最新推荐文章于 2024-08-08 09:09:48 发布