Skip to content

Commit

Permalink
inherits from Print (instead of Stream)
Browse files Browse the repository at this point in the history
  • Loading branch information
drewfish committed May 21, 2020
1 parent d985772 commit 683dc3d
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions examples/ZeroRegsExampleLogger/ExampleLogStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <Stream.h>


class ExampleLogStream : public Stream {
class ExampleLogStream : public Print {
Stream &wrapped;
bool prefixWritten;

Expand Down Expand Up @@ -37,18 +37,7 @@ class ExampleLogStream : public Stream {
public:
ExampleLogStream(Stream &_wrapped) : wrapped(_wrapped), prefixWritten(false) {}

// virtual functions from Stream
int available() {
return wrapped.available();
}
int read() {
return wrapped.read();
}
int peek() {
return wrapped.peek();
}

// virtual function from Print (from Stream)
// virtual function from Print
size_t write(uint8_t c) {
size_t s = 0;
if (! prefixWritten) {
Expand Down

0 comments on commit 683dc3d

Please sign in to comment.