-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Fix Hardwareserial sending a byte twice #3865
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
Conversation
This code still has the Also, perhaps you could use |
Added, also applied for the one left cli() that was there before. |
Looking at this PR, it actually seems like it applies good fixes. See https://github.com/arduino/Arduino/issues/3745#issuecomment-331627824 for a summary of the related problems. This PR makes the following changes:
All of which I think are useful and relevant. However, I think this PR could still be improved:
@NicoHood, would you be interested in making these changes? |
@matthijskooijman I've granted arduino maintainers access to my patch branch via github. I currently have no time to do and test the changes. Feel free to modify or do a new PR, the important stuff is already there (how to fix the issue). |
Are either of you working on this? If not I'm happy to make a new PR based on @NicoHood's work and incorporating changes suggested by @matthijskooijman. @matthijskooijman I've defined the TX_BUFFER_ATOMIC macro in HardwareSerial.h, but would you prefer it in HardwareSerial.cpp? Also is the include of <util/atomic.h> needed for ATOMIC_BLOCK better kept local in HardwareSerial.h or in Arduino.h to support use elsewhere? |
@johnholman, I'm not finding the time for this, so I'm not working on this. If you would, that would be great. As for the |
@matthijskooijman, @NicoHood I've created pull request #6855 for this. |
I'm closing this one in favor of #6855. |
https://github.com/arduino/Arduino/issues/3745
This also solves a flush() lockup.