Skip to content
New issue

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

SerialPort::clear #53

Open
thepperson opened this issue May 5, 2022 · 1 comment
Open

SerialPort::clear #53

thepperson opened this issue May 5, 2022 · 1 comment

Comments

@thepperson
Copy link

The SerialPort::Clear function seems to do really wonky stuff to the receive buffer in async code. I see a lot of messages repeated twice and partial messages when I use the async function read_to_end
I am calling clear on a SerialStream object.

@iynehz
Copy link

iynehz commented Jun 30, 2022

I also got some issue with SerialPort::clear but in a different senario,

After I get the SerialStream object via open_native_async(), I do a clear(All), then I write async to serial bus the first message and there is ideally response coming from serial. But in this case it can't get anything to the read buffer.

In contrast, if I do clear(Output) or if I don't do clear() at all, it works good and I can read the response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants