We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getRawPayloadBytesPadded()中 byte[] encData = subbytes(data, BLDevice.DEFAULT_BYTES_SIZE, data.length); 已经去掉了长度 DEFAULT_BYTES_SIZE = 0x38; // 56-bytes 的header ,然而在getStatesRaw() 中截取state时又算上了header的长度。 解决方法 : if (pl[0x3c] >= 48 && pl[0x3c] <= 57) { String decodeValue1; decodeValue1 = String.valueOf(pl[0x46]); state = Short.decode(decodeValue1).byteValue(); } else { state = pl[0x46]; }
0x3c 和0x46的地方的地方需要减去 DEFAULT_BYTES_SIZE = 0x38 的长度。 if (pl[0x4] >= 48 && pl[0x4] <= 57) { String decodeValue1; decodeValue1 = String.valueOf(pl[0xe]); state = Short.decode(decodeValue1).byteValue(); } else { state = pl[0xe]; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
getRawPayloadBytesPadded()中
byte[] encData = subbytes(data, BLDevice.DEFAULT_BYTES_SIZE, data.length);
已经去掉了长度 DEFAULT_BYTES_SIZE = 0x38; // 56-bytes 的header ,然而在getStatesRaw() 中截取state时又算上了header的长度。
解决方法 :
if (pl[0x3c] >= 48 && pl[0x3c] <= 57) {
String decodeValue1;
decodeValue1 = String.valueOf(pl[0x46]);
state = Short.decode(decodeValue1).byteValue();
} else {
state = pl[0x46];
}
0x3c 和0x46的地方的地方需要减去 DEFAULT_BYTES_SIZE = 0x38 的长度。
if (pl[0x4] >= 48 && pl[0x4] <= 57) {
String decodeValue1;
decodeValue1 = String.valueOf(pl[0xe]);
state = Short.decode(decodeValue1).byteValue();
} else {
state = pl[0xe];
}
The text was updated successfully, but these errors were encountered: