11.11.2020, 16:57
Hi there,
In forum, there are examples for byte and bit decoding.
I need to decode 3 byte information to 3 different byte as a 3 different point. In my example, my 3 bytes point value is 46124.
If we decode,
my first byte value will be 44
my second byte value will be 180 and
my third byte value will be 0
as 3 different points. I used a script like that and it didn't worked. Can you help me about it ?
value = event.getvalue()
bytes = { value:byte(1, #value) }
grp.checkupdate('32/1/1', bytes[ 1 ])
grp.checkupdate('32/1/2', bytes[ 2 ])
grp.checkupdate('32/1/3', bytes[ 3 ])
Thanks,
In forum, there are examples for byte and bit decoding.
I need to decode 3 byte information to 3 different byte as a 3 different point. In my example, my 3 bytes point value is 46124.
If we decode,
my first byte value will be 44
my second byte value will be 180 and
my third byte value will be 0
as 3 different points. I used a script like that and it didn't worked. Can you help me about it ?
value = event.getvalue()
bytes = { value:byte(1, #value) }
grp.checkupdate('32/1/1', bytes[ 1 ])
grp.checkupdate('32/1/2', bytes[ 2 ])
grp.checkupdate('32/1/3', bytes[ 3 ])
Thanks,