Skip to content

Commit 00e9c78

Browse files
committed
Fix missing virtual declarations in Stream.h
Fixes some changes made in PR espressif#10328
1 parent 9e60bbe commit 00e9c78

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

cores/esp32/Stream.h

+4-3
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ class Stream : public Print {
6161
Stream() {
6262
_timeout = 1000;
6363
}
64+
virtual ~Stream() {}
6465

6566
// parsing methods
6667

@@ -105,8 +106,8 @@ class Stream : public Print {
105106
float parseFloat(LookaheadMode lookahead = SKIP_ALL, char ignore = NO_IGNORE_CHAR);
106107
// float version of parseInt
107108

108-
size_t readBytes(char *buffer, size_t length); // read chars from stream into buffer
109-
size_t readBytes(uint8_t *buffer, size_t length) {
109+
virtual size_t readBytes(char *buffer, size_t length); // read chars from stream into buffer
110+
virtual size_t readBytes(uint8_t *buffer, size_t length) {
110111
return readBytes((char *)buffer, length);
111112
}
112113
// terminates if length characters have been read or timeout (see setTimeout)
@@ -120,7 +121,7 @@ class Stream : public Print {
120121
// returns the number of characters placed in the buffer (0 means no valid data found)
121122

122123
// Arduino String functions to be added here
123-
String readString();
124+
virtual String readString();
124125
String readStringUntil(char terminator);
125126

126127
protected:

0 commit comments

Comments
 (0)