Closed xiptos closed 7 years ago
@xiptos something might be off, unfortunately I don't have any stickers to test anything with now.
var rawBatteryLevel = (manufacturerData.readUInt8(15) << 8) + ((manufacturerData.readUInt8(14) >> 4) & 0x3ff);
do you think it should be:
var rawBatteryLevel = (manufacturerData.readUInt8(15) << 4) + ((manufacturerData.readUInt8(14) >> 4) & 0x3ff);
If you have time to try this out and compare to the Estimote app, I can change it ...
Closing this due to lack of activity.
Hi! When looking at the way battery level is calculated, I get the impression that there is something not right... On line 88 (estimate-sticker.js), the first byte is rotated 8 bits and added to the second byte, after it is left rotated 4 bits, in which the first 6 bit (in 16) are cleared. Is this ok? The last part is irrelevant, right?
Cheers, /rp