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

File inherits from Stream: proper support for print and println of al… #72

Merged
merged 1 commit into from
Sep 5, 2024

Conversation

pschatzmann
Copy link
Contributor

@pschatzmann pschatzmann commented Jul 10, 2024

Summary

File must inherit from Stream: proper support for print and println of all supported data types.
The motivation for this, was that in all other SD libraries the File impelmentation is a subclass of Stream which itself is a subclass of Print.

With this change we can now also provide the files of this library to any Arduino function which expects a Stream or a Print.

Validation

I extended the test sketch Full.ino to test the readBytes() method and the printing of an integer.

Closing issues

I did not file any issue but decided to submit a pull request directly to speed up things.
see https://github.com/orgs/stm32duino/discussions/2428

@fpistm fpistm self-requested a review July 10, 2024 12:12
@fpistm fpistm added the enhancement New feature or request label Jul 10, 2024
@fpistm fpistm modified the milestones: 1.3.2, 1.3.3 Aug 29, 2024
src/STM32SD.h Outdated Show resolved Hide resolved
@fpistm fpistm self-requested a review September 2, 2024 07:25
@fpistm
Copy link
Member

fpistm commented Sep 5, 2024

Hi @pschatzmann
I've updated your PR to remove useless print/println methods.
Thanks again for your contribution.

@pschatzmann
Copy link
Contributor Author

Cool, thanks

@fpistm fpistm merged commit 217975d into stm32duino:main Sep 5, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

2 participants