[UI] Configurable Allocator for modm::ViewStack#1184
Merged
salkinium merged 4 commits intomodm-io:developfrom Aug 8, 2024
Merged
[UI] Configurable Allocator for modm::ViewStack#1184salkinium merged 4 commits intomodm-io:developfrom
salkinium merged 4 commits intomodm-io:developfrom
Conversation
Contributor
Author
|
@OroArmor @calebchalmers here you go |
a824be5 to
667d67d
Compare
salkinium
reviewed
Jul 14, 2024
salkinium
approved these changes
Jul 21, 2024
Member
salkinium
left a comment
There was a problem hiding this comment.
Awesome! Could you rebase on develop again to apply the fixup?
This way it can be specialized with a monochrome or color display later.
0d5bd59 to
261fba9
Compare
Member
|
The fixup is still there. Try |
Allowing a custom allocator allows users to control how modm::AbstractView elements stored by the view stack are allocated. This, for example, allows the user to statically allocate all views and removes the memory and processing overhead of dynamically allocating views. For an example, see aruw-mcb's MainMenu class: https://github.com/uw-advanced-robotics/aruw-mcb/blob/develop/aruw-mcb-project/src/aruwsrc/display/main_menu.cpp By default, a dynamic allocator used, so default behavior remains unchanged.
261fba9 to
beb03f3
Compare
Contributor
Author
Ah I misunderstood what you were asking, should be done now |
This file contains hidden or 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
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.
Having a custom allocator allows users to control how
modm::AbstractViewelements stored by the view stack are allocated. This for example, allows the user to statically allocate all views and removes the memory and processing overhead of dynamically allocating views. For an example, see aruw-mcb'sMainMenuclass. By default, a dynamic allocator used, so default behavior remains unchanged.This also has a couple minor tweaks to other UI related components.
This is a follow-on to #949 and https://github.com/salkinium/modm/tree/JoshuaT/ModmUpgrade2 that contains outstanding commits that were never applied cherry-picked on top of latest modm-io/modm develop.