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

in BluetoothSerial.setTimeout also set timeout for parent class Stream. #7924

Merged
merged 1 commit into from
Mar 31, 2023
Merged

Conversation

MnlPhlp
Copy link
Contributor

@MnlPhlp MnlPhlp commented Mar 3, 2023

Description of Change

In the BluetoothSerial.setTimeout function the setTimeout function of the parent Class Stream should also be called.
Without this it is not possible to set the timeout used in for example the ReadString function of an instance of BluetoothSerial. The ReadString function is not overwritten and uses the Stream timeout.

The error was discovered because something like the example Code below would just ignore the timeout and wait the default 1000 ms on readString()

MyBluetoothSerial SerialBT;
...
SerialBT.setTimeout(5);
String temp = SerialBT.readString();

@CLAassistant
Copy link

CLAassistant commented Mar 3, 2023

CLA assistant check
All committers have signed the CLA.

@VojtechBartoska VojtechBartoska added the Area: BT&Wifi BT & Wifi related issues label Mar 8, 2023
Copy link
Contributor

@PilnyTomas PilnyTomas left a comment

Choose a reason for hiding this comment

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

LGTM

@me-no-dev me-no-dev merged commit 7fd956d into espressif:master Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: BT&Wifi BT & Wifi related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants