-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
目前读取回调onDataReceived中,不管发送的数据包多大,总是拿到63字节的缓冲区。无法确定收到数据的大小。 #12
Comments
// int available = SerialHelper.this.mInputStream.available(); 这个地方,没有处理读取到的长度 |
默认实现的是 BaseStickPackageHelper,实现如下: @Override
public byte[] execute(InputStream is) {
try {
int available = is.available();
if (available > 0) {
byte[] buffer = new byte['?'];
int size = is.read(buffer);
if (size > 0) {
return buffer;
}
} else {
SystemClock.sleep(50);
}
} catch (IOException e) {
e.printStackTrace();
}
return null;
} 可以看到 |
谢谢。能看懂了。 |
如题
目前在SerialHelper的读取回调onDataReceived中,不管发送的数据包多大,总是拿到63字节的缓冲区。无法确定收到数据的大小。
The text was updated successfully, but these errors were encountered: