Answer the question
In order to leave comments, you need to log in
What does the concept of "ring buffer" tell you?
Long, long thought and finally matured). What mathematical model would you suggest so that it fills with a, then fills up again?
Answer the question
In order to leave comments, you need to log in
Banal array of length Len
Index of the next element: Index = (Index + 1) % Len
Index of the previous element: Index = (Index + Len - 1) % Len
Add to the head, read from the tail - accordingly, the buffer contains two indices: Head and Tail .
If the head catches up with the tail, the buffer is full.
If the tail caught up with the head, the buffer is empty.
Create an array of fixed size.
methods push and pop
Push increments the pointer, when it reaches the top it jumps to the beginning.
Pop simply returns the current pointer or the current pointer minus the number of samples.
This is for values
. For video, record in chunks of 2 mb in memory, store only the name and date. If you have exhausted the card limit, then delete the old files until there is enough space to record a new chunk.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question