RingBufferStream over underflow control . #811
-
i want to use ring buffer stream ,but cant control the actual position how much it its filled . RingBufferStream rngbuffer; how to do this ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I think you talk nonsense: available() will provide the number of entries that are available in the buffer and availableForWrite() provides the number of entries that can still be written: So your buffer is full! There is no surprise here as this is valid for all Arduino Streams like e.g. Serial You can define the size in the constructor or call resize(). |
Beta Was this translation helpful? Give feedback.
I think you talk nonsense: available() will provide the number of entries that are available in the buffer and availableForWrite() provides the number of entries that can still be written: So your buffer is full!
There is no surprise here as this is valid for all Arduino Streams like e.g. Serial
and it continues to be full as long as you don't start to read from it!
You can define the size in the constructor or call resize().