Closed cdaller closed 4 years ago
The gas numbers sent by my thingy are encoded in hex, not in decimal, so a conversion is needed to get the correct values for eCO2 and TVOC.
This is also done in the nodejs library of Nordic (https://github.com/NordicPlayground/Nordic-Thingy52-Nodejs/blob/master/lib/thingy.js)
Thingy.prototype.onGasNotif = function(data) { var gas = { eco2 : data.readUInt16LE(0), tvoc : data.readUInt16LE(2) } this.emit('gasNotif', gas); };
Thanks for the fix - as it happens this was also included in #335, which I've just merged.
The gas numbers sent by my thingy are encoded in hex, not in decimal, so a conversion is needed to get the correct values for eCO2 and TVOC.
This is also done in the nodejs library of Nordic (https://github.com/NordicPlayground/Nordic-Thingy52-Nodejs/blob/master/lib/thingy.js)