Last active
December 23, 2019 10:54
-
-
Save astagi/0653596ba752d71365ad2af75b6a7b8a to your computer and use it in GitHub Desktop.
R2D2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let calculateChk = (buff) => { | |
let ret = 0x00; | |
for (let i = 0 ; i < buff.length ; i++) { | |
ret += buff[i]; | |
} | |
ret = ret & 255; | |
return (ret ^ 255); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment