Closed nuannuande closed 6 years ago
@nuannuande We are aware of this issue. I am pretty busy at the moment so it may be a bit before I can get to it. As a work around, you could read the entire word and then look at individual bits of the read data via the native javascript bitwise operators. Something like the following could work for now.
let bit;
// Let's say we are concerned with the 3rd bit of readTag (readTag.2)
// then the following should work
bit = readTag & 0b00000100 !== 0 ? true : false;
That said, we would love some help continuing to develop library, thus pull requests are welcome 😄.
We really appreciate you using the project and helping us uncover some of these bugs!
bool var not right
Current Behavior
in tag/index.js this.controller_value = data.readUInt8(2) === 0x01 ? true : false;
i test while the bool is true ,the return data is <buff 00 ff> so this.controller_value = data.readUInt8(2) === 0xff ? true : false;
Expected Behavior
Possible Solution (Optional)
Context
Steps to Reproduce (for bugs only)
1. 2. 3. 4.
Your Environment
npm list
- e.g. 1.0.6):node --version
- e.g. 9.8.0):