Skip to content

Move the flush method from Stream to Print #2387

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

Closed
wants to merge 1 commit into from

Conversation

matthijskooijman
Copy link
Collaborator

This method originally flushed pending input bytes, which makes sense in
Stream. At some point it was changed to flush output bytes instead, but
it was never moved to Print to reflect this.

Since Stream inherits from Print, this should not really affect any
users of the Stream or Print classes. However to prevent problems with
existing implementations of the Print class that do not provide a
flush() implementation, a default implementation is provided. We should
probably remove this at some point in the future, though.

@matthijskooijman matthijskooijman added Component: Core Related to the code for the standard Arduino API Type: Bug labels Oct 29, 2014
This method originally flushed pending input bytes, which makes sense in
Stream. At some point it was changed to flush output bytes instead, but
it was never moved to Print to reflect this.

Since Stream inherits from Print, this should not really affect any
users of the Stream or Print classes. However to prevent problems with
existing implementations of the Print class that do not provide a
flush() implementation, a default implementation is provided. We should
probably remove this at some point in the future, though.
@matthijskooijman
Copy link
Collaborator Author

I just rebased this PR. Anything keeping it from being merged?

@Chris--A
Copy link
Contributor

+1, this should be merged.

I need this feature available from a Print only derived class.

@facchinm facchinm added the Print and Stream class The Arduino core library's Print and Stream classes label Jan 20, 2017
@eric-wieser
Copy link
Contributor

I imagine this needs a rebase, since the sam files are now gone

@PaulStoffregen
Copy link
Contributor

This looks good to me. I'd recommend merging.

@eric-wieser
Copy link
Contributor

@PaulStoffregen: I don't think merging through the online interface will do the right thing, since this modifies files that were deleted in master. I'm surprised this doesn't produce a merge conflict

@cmaglie
Copy link
Member

cmaglie commented May 23, 2017

it's still mergeable becuase it targets the ide-1.5.x branch instead of master, I'll manually merge this commit and edit the conflicts.

@cmaglie
Copy link
Member

cmaglie commented May 23, 2017

Manually merged here: ed7007c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Core Related to the code for the standard Arduino API Print and Stream class The Arduino core library's Print and Stream classes Type: Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants