Expand description
A ring buffer implementation where newer samples overwrite old samples. This implementation also enables the use of Rust iterators to iterate through the ring buffer in order from oldest to newest entries.
This library is implemented without the use of the standard library, and thus requires passing in a “backing store” of a statically allocated array.
Macros§
Structs§
- An implementation of a ring buffer data structure that creates a “lossy” queue. This is a simplified version of the generic heapless
Queue
with a few constraints relaxed:
Functions§
- Calculate the root-mean-square of
buffer
, passing inmean
as the pre-calculated mean. - Calculate the mean of the values inside
buffer
. - Calculate the AC RMS of the last
window_len
values insidebuffer
. - Calculate the mean of the last
window_len
values insidebuffer
.