User Profile
Collapse
-
Thank you! I needed a way to generate timer driven events in a wxPython sub-thread and this works great! -
Python - check CRC of a frame CRC-16-CCITT
Here is some code to check the CRC of a given message. The result of 0 indicates no trouble found. Reference: http://www.ross.net/crc/download/crc_v3.txt
...Code:def checkCRC(message): #CRC-16-CITT poly, the CRC sheme used by ymodem protocol poly = 0x1021 #16bit operation register, initialized to zeros reg = 0x0000 #pad the end of the message with the size of the poly message += '\x00\x00'
No activity results to display
Show More
Leave a comment: