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

Add abstraction for FRAM ring array #323

Closed
PatrickKa opened this issue Sep 15, 2024 · 0 comments · Fixed by #296
Closed

Add abstraction for FRAM ring array #323

PatrickKa opened this issue Sep 15, 2024 · 0 comments · Fixed by #296

Comments

@PatrickKa
Copy link
Contributor

Description

We need this common functionality for #179 and #204, so I made a separate issue for it.

A ring array is an array with periodic boundary conditions. Appending an element to a full ring array should cause the oldest element to be lost. Apart from the actual data, also the begin and end indexes should be stored on the FRAM. The PersistentVariables class should be used for that, which means that the indexes are also error corrected.

As mentioned in #294 we also need a fallback mechanism in case the FRAM does not work. For this, an etl::circular_buffer should be used to cache the values in RAM. The size of this circular buffer should be specified separately, as it is usually much smaller.

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

Successfully merging a pull request may close this issue.

2 participants