-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Add HardwareSerial::updateBaudRate(unsigned long baud) #6494
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
Add HardwareSerial::updateBaudRate(unsigned long baud) #6494
Conversation
… begin was called
@d-a-v or @earlephilhower, any chance this gets merged soon? :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One linefeed issue, but OTW looks safe enough to me.
@@ -133,8 +142,8 @@ unsigned long HardwareSerial::detectBaudrate(time_t timeoutMillis) | |||
return detectedBaudrate; | |||
} | |||
|
|||
size_t HardwareSerial::readBytes(char* buffer, size_t size) | |||
{ | |||
size_t HardwareSerial::readBytes(char* buffer, size_t size) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a linefeed change here? I think this whole file is DOS \r\n formatted, but your patch only has \UNIX n. For now, could you make sure you match the linefeeds of the rest of the file (yes, I hate DOS linefeeds, too, but we need to be consistent in any particular file).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really do not know. I did not touch these lines. Could you please check it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is indeed a crlf change.
And after checking, this PR restores consistency which is not here in current master.
(The Allman process shall have a try-again session)
Add HardwareSerial::updateBaudRate(unsigned long baud) to change the baudrate after ::begin() was called.