Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

HardwareSerial's flush() method to override the method of the base class Print#2254

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fpistm merged 2 commits intostm32duino:mainfromilolis:main
Jan 22, 2024

Conversation

ilolis
Copy link
Contributor

@ilolisilolis commentedJan 19, 2024
edited
Loading

This PR addresses the followingbugs/features

  • Bug: Fixing issue with base class Print'svoid flush() method not being overridden by derivative HardwareSerial'svoid flush(uint32_t timeout = 0) method.

The base class Printdefinesvoid flush(), while the derivative HardwareSerial definesvoid flush(uint32_t timeout = 0). The issue was that when using the base class instance pointer, the virtual function of the derivative was not being called. This PR resolves this.

I might be missing something since I am new to this project, so please feel free to correct me :)

Copy link
Member

@fpistmfpistm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM
Thanls@ilolis

@fpistmfpistm added this to the2.8.0 milestoneJan 22, 2024
@fpistm
Copy link
Member

Tested with:

Stream &myStream = Serial; void setup() {  // put your setup code here, to run once:  Serial.begin(9600);}void loop() {  // put your main code here, to run repeatedly:  // read the input on analog pin 0:  int sensorValue = analogRead(A0);  // print out the value you read:  myStream.println(sensorValue);  myStream.flush();  delay(1);  // delay in between reads for stability}

@fpistmfpistm merged commit49b8eef intostm32duino:mainJan 22, 2024
tadtruex pushed a commit to TadAtThayer/Arduino_Core_STM32 that referenced this pull requestApr 23, 2024
…ass Print (stm32duino#2254)* add flush() method to HardwareSerial* remove default argument
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@fpistmfpistmfpistm approved these changes

Assignees
No one assigned
Projects
Milestone
2.8.0
Development

Successfully merging this pull request may close these issues.

2 participants
@ilolis@fpistm

[8]ページ先頭

©2009-2025 Movatter.jp