updated firmware
This commit is contained in:
parent
9891b8ed44
commit
f17ca0c820
11 changed files with 273 additions and 56 deletions
|
|
@ -33,6 +33,11 @@ class RingBuffer {
|
|||
return &(buffer[tail]);
|
||||
}
|
||||
|
||||
T* get(int i) {
|
||||
if (count == 0) return nullptr;
|
||||
return &(buffer[(tail + i) % N]);
|
||||
}
|
||||
|
||||
bool empty() const { return count == 0; }
|
||||
bool full() const { return count == N; }
|
||||
int size() const { return count; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue