Skip to content

Commit 2a6f0d4

Browse files
committed
change debug from Serial to Stream
1 parent 4db4918 commit 2a6f0d4

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

libraries/WiFiS3/src/Modem.h

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,9 @@ class ModemClass {
4444
4545
level from 0 defaul to 2 (maximum) */
4646

47-
void debug(UART *u = nullptr, uint8_t level = 0) {
48-
if(u == nullptr) {
49-
_serial_debug = &Serial;
50-
}
51-
else {
52-
_serial_debug = u;
53-
}
47+
void debug(Stream &u, uint8_t level = 0) {
48+
_serial_debug = &u;
49+
5450
if(level > 2) {
5551
level = 2;
5652
}
@@ -75,7 +71,7 @@ class ModemClass {
7571
bool trim_results;
7672
bool read_by_size;
7773
bool read_by_size_finished(std::string &rx);
78-
UART * _serial_debug;
74+
Stream * _serial_debug;
7975
uint8_t _debug_level = 0;
8076
};
8177

0 commit comments

Comments
 (0)