Keyboard Shortcuts
ctrl + shift + ? :
Show all keyboard shortcuts
ctrl + g :
Navigate to a group
ctrl + shift + f :
Find
ctrl + / :
Quick actions
esc to dismiss
Likes
Search
Calculate a checksum
We're going to need to know what kind of checksum you're calculating here.
The API/Protocol document for the product you're integrating should specify how to calculate it. If you can tell us what product or the specified calculation we can try to assist you in how to build the calculation in code. On Thu, Jun 6, 2013 at 9:15 AM, maglite4cell <maglite4cell@...>wrote: ** [Non-text portions of this message have been removed] |
maglite4cell
It uses all of the hex bytes to calculate it the formula is (\x100 - (sum of data bytes))
toggle quoted message
Show quoted text
--- In Crestron@..., Neil Dorin <neildorin@...> wrote:
|
Chip
Then you could use an ATOS symbol in SIMPL with an option of 259d.
toggle quoted message
Show quoted text
If you want to do this in S+, and your bytes are in "msg$", you could do this: X = 0; FOR (Y = 1 TO LEN(msg$)) { X = X + BYTE(msg$,Y); } // This gives you a sum of all your bytes in "Y" CHK = 256 - LOW(Y); // In case the bytes add up to more than $FF, use LOW - Chip --- In Crestron@..., "maglite4cell" <maglite4cell@...> wrote:
|
Chip
Oh, and (potentially) last step:
toggle quoted message
Show quoted text
tx$ = msg$ + CHR(CHK); //sends your message and checksum byte... - Chip --- In Crestron@..., "Chip" <cfm@...> wrote:
|
maglite4cell
Thanks!
toggle quoted message
Show quoted text
I worked through it and came out with something similar. --- In Crestron@..., "Chip" <cfm@...> wrote:
|
to navigate to use esc to dismiss