Você não pode selecionar mais de 25 tópicos
Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
Ondřej Hruška
891c07f5fb
|
8 anos atrás | |
---|---|---|
.. | ||
README.md | 8 anos atrás | |
meanbuf.c | 8 anos atrás | |
meanbuf.h | 8 anos atrás |
README.md
Averaging float buffer
(You can adjust it to use doubles, if you prefer.)
The meanbuf_create()
function allocates a buffer.
You can then call meanbuf_add()
to add a new value into the buffer (and remove the oldest).
This function returns the current average value.
This buffer can be used for signal smoothing (such as from an analogue sensor).