-
Notifications
You must be signed in to change notification settings - Fork 150
[UI] Configurable Allocator for modm::ViewStack #1184
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
[UI] Configurable Allocator for modm::ViewStack #1184
Conversation
@OroArmor @calebchalmers here you go |
a824be5
to
667d67d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
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
Ah I misunderstood what you were asking, should be done now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Having 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'sMainMenu
class. 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.