Closed PreinfalkG closed 4 years ago
I cannot reproduce:
$ node
Welcome to Node.js v12.12.0.
Type ".help" for more information.
> let bytes = [0, 0, 0, 0, 0xfe, 0xc1]
undefined
> let decoded = {}
undefined
> decoded.temperature = ((0xffff << 16) + (bytes[4] << 8) + bytes[5]) / 100;
-3.19
Are you sure you are using the most up-to-date Decoder.js
from the example you referenced?
oh sorry, i really used an old version of decoder.js
In the basic example negative temperatures are not processed correctly -> see Screenshot