-
Notifications
You must be signed in to change notification settings - Fork 2
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
Move EDU program queue to FRAM #336
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3f72a25
to
403dd21
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #336 +/- ##
==========================================
+ Coverage 79.68% 81.98% +2.30%
==========================================
Files 47 49 +2
Lines 1580 1782 +202
Branches 57 77 +20
==========================================
+ Hits 1259 1461 +202
Misses 321 321 ☔ View full report in Codecov by Sentry. |
- Add comments for sections - Add missing includes - Finish test for custom type
There was a copy-paste error. The correct section is "eduProgramQueue" and not "eduProgramStatusHistory".
403dd21
to
aeaeb9c
Compare
- Remove the member variables for the begin and end indexes and instead made the relevant functions take them as arguments or return them. This makes it more obvious which functions need or provide them. - To reduce the number of times that the indexes are loaded from the FRAM, split some functions into two. One version for when the FRAM is working and one for when we only use the cache. This together with the first point allows loading the indexes only once in functions like `FindAndReplace()` and then passing them down the call chain. - Change `SizeType`, `IndexType`, and the type of `nCachedElements` to the underlying type of `fram::Size`, which is `uint32_t`.
I forgot about this case so it was most likely undefined behaviour. Now I changed it to return `T{}` instead.
- Do some refactoring - Add tests for `Clear()` - Test `Get()` on empty vectors
- Rename `Empty()` and `Full()` to `IsEmpty()` and `IsFull()` - Fix `Get()` not returning last element if index is out of bounds - Fix `IsFull()` always comparing the size to the FRAM capacity, even when the FRAM is not working - Cache elements in serialized form to save RAM - Remove member variable `size` and pass the size around instead - Change `SizeType`, `IndexType`, and the type of `nCachedElements` to the underlying type of `fram::Size`, which is `uint32_t` - Rename `Read/WriteElement()` to `Load/StoreElement()` to be consistent with `Load/StoreSize()` - No longer call public functions from other public functions to prevent entering the semaphore twice - Rename sections and persistent variables from indexes to metadata
aeaeb9c
to
3342296
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes #203