Skip to content
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

在读取串口数据的线程里,字符设备文件的.available() 总是返回0的,所以出现有时读取不到串口数据 #9

Closed
beyondbycyx opened this issue Nov 9, 2020 · 3 comments

Comments

@beyondbycyx
Copy link

https://stackoverflow.com/questions/5826198/inputstream-available-is-0-always ,这里有说明,应该改为 read() 才行。而且我现在出现了并发传过来的多个信号,只有一个信号读取到,其他的信号都被忽略了。不知这个问题,你解决的了吗?并发数据传过来的读取问题

@xmaihh
Copy link
Owner

xmaihh commented Nov 9, 2020

我目前没有遇到出现并发传过来的多个信号,只有一个信号读取到,其他信号丢失的问题

@guodonghuang
Copy link

我也有类似问题,就是一个指令要发送多次,才能有响应数据,但是响应数据会有多个重复字段,最后还一串000000000,是不是前几次被阻塞了

@xmaihh
Copy link
Owner

xmaihh commented Jul 20, 2021

请参考iissues12

@xmaihh xmaihh closed this as completed Jun 21, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants