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

[UI] Configurable Allocator for modm::ViewStack #1184

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

MatthewMArnold
Copy link

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's MainMenu 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.

@MatthewMArnold
Copy link
Author

MatthewMArnold commented Jul 11, 2024

@OroArmor @calebchalmers here you go

Copy link
Member

@salkinium salkinium left a 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.
@salkinium
Copy link
Member

The fixup is still there. Try git rebase -i develop to apply the fixup to the right commit.

 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.
@MatthewMArnold
Copy link
Author

The fixup is still there. Try git rebase -i develop to apply the fixup to the right commit.

Ah I misunderstood what you were asking, should be done now

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

Successfully merging this pull request may close these issues.

None yet

2 participants