Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev: added an initial working version of the circular buffer. #1060

Closed
wants to merge 4 commits into from
Closed

Dev: added an initial working version of the circular buffer. #1060

wants to merge 4 commits into from

Conversation

hvegh
Copy link
Contributor

@hvegh hvegh commented Feb 17, 2016

Comments are welcome.

Here's a link to the API documentation:
https://github.com/hvegh/nodemcu-firmware/blob/dev/docs/en/modules/cirbuf.md

@TerryE
Copy link
Collaborator

TerryE commented Feb 17, 2016

Have you thought of a companion module which is just a wrap-around byte array of variable length records (up to 255 bytes if you wish) with a similar API but you have push and pushf methods. This could be really useful for general debugging?

@TerryE
Copy link
Collaborator

TerryE commented Feb 17, 2016

👍 on the general idea, but just like my last PR you've done something weird with 70cb01b. This is nothing to do with this PR. You need to remove this.

The cirbuf module provides a simple, in memory, [circular
buffer](https://en.wikipedia.org/wiki/Circular_buffer). This simplifies
the design of typical workloads like the sampling of sensors at regular
intervals. The memory usage is efficient, apart from ~20 bytes for
administration of the circular buffer no additional overhead is required
to store the data.

signed-off-by: [email protected]
@hvegh
Copy link
Contributor Author

hvegh commented Feb 17, 2016

Merged the relevant patches, but I don't seem be able to get rid of 70cb01b ...

The cirbuf module provides a simple, in memory, [circular
buffer](https://en.wikipedia.org/wiki/Circular_buffer). This simplifies
the design of typical workloads like the sampling of sensors at regular
intervals. The memory usage is efficient, apart from ~20 bytes for
administration of the circular buffer no additional overhead is required
to store the data.

signed-off-by: [email protected]
@marcelstoer
Copy link
Member

@hvegh
Copy link
Contributor Author

hvegh commented Feb 17, 2016

Fixed stuff in #1062

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants