From 3aef54c0fe06bf2c688f2900806199dede1ed575 Mon Sep 17 00:00:00 2001 From: Harald Barth Date: Sun, 31 Jul 2022 00:53:26 +0200 Subject: [PATCH] add RinStream::info() --- RingStream.cpp | 4 ++++ RingStream.h | 1 + 2 files changed, 5 insertions(+) diff --git a/RingStream.cpp b/RingStream.cpp index 4a75c1a..51a77d2 100644 --- a/RingStream.cpp +++ b/RingStream.cpp @@ -157,6 +157,10 @@ uint8_t RingStream::peekTargetMark() { return _buffer[_mark]; } +void RingStream::info() { + DIAG(F("Info len=%d count=%d pr=%d pw=%d m=%d"),_len, _count,_pos_read,_pos_write,_mark); +} + bool RingStream::commit() { _flashInsert=NULL; // prepared for first read if (_overflow) { diff --git a/RingStream.h b/RingStream.h index 2178dea..45b1c4e 100644 --- a/RingStream.h +++ b/RingStream.h @@ -47,6 +47,7 @@ class RingStream : public Print { bool commit(); uint8_t peekTargetMark(); void flush(); + void info(); private: int read(byte advance); byte readRawByte(byte advance=1);