I am receiving data in chunks of 8 bytes.
In most cases 4 times 2 pairs of high/low bytes need to be converted into one decimal.
I am not sure how to do this.
Do these two bytes need to be added binary to 16 bit and then converted to DEC?
I am sure there is some bit shifting magic at work to get there.
Any hints appreciated.
The data buffer looks like this: (lines without a time are in DEC)
Time PGN Byte0 Byte1 Byte2 Byte3 Byte4 Byte5 Byte6 Byte7
63 0x28 0x80 0x00 0x00 0x00 0x00 0x00 0x00 0x00
125 0x1E 0x04 0x01 0xF4 0x02 0x74 0xFF 0x00 0x00
188 0x12D 0x14 0xEB 0x14 0xF8 0x14 0x9C 0x14 0x93
301 20 235 20 248 20 156 20 147
191 0x12E 0x14 0x61 0x14 0x63 0x14 0x21 0x14 0x7B
302 20 97 20 99 20 33 20 123
250 0x137 0x0B 0xCA 0x09 0xFC 0x09 0x68 0x09 0x5A
311 011 202 09 252 09 104 09 90
253 0x138 0x09 0xAD 0x09 0xF9 0x09 0x92 0x0B 0x77
312 09 173 09 249 09 146 011 119