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

LayoutManager & button layout enhancements/fixes #899

Merged
merged 2 commits into from
Mar 19, 2024

Conversation

mikepparks
Copy link
Contributor

@mikepparks mikepparks commented Mar 18, 2024

Fixes:
Addresses a bug with the Input History button glyph LUT that would cause the firmware to crash when run from a Debug build state.

Enhancements:
LayoutManager was created to allow sharing of built-in and custom layouts beyond the use of the OLED Display. This also includes two new API routes for the WebConfig:

  • /api/getButtonLayoutDefs
    • Returns the list of ButtonLayout and ButtonLayoutRight definitions and their values.
  • /api/getButtonLayouts
    • Returns the layouts for the current ButtonLayout and ButtonLayoutRight definitions, as well as the LED layout indexes.

This also includes enhancements to the button layouts to change from an unnamed array of parameters to named properties. The defined button layouts will still use the previous structure for brevity, but the names exist to make the layout generation code easier to use.

Added methods to webconfig.cpp for exposing LED and Display layout structures
@mikepparks mikepparks changed the title LayoutManager & button layout structure enhancements LayoutManager & button layout enhancements/fixes Mar 18, 2024
@mikepparks mikepparks marked this pull request as ready for review March 19, 2024 00:55
Copy link
Contributor

@arntsonl arntsonl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, this is a good way of managing our layouts/input history, and keeping the debug from crashing. Those poor 264kb of RAM

@arntsonl arntsonl merged commit 831c4f2 into OpenStickCommunity:main Mar 19, 2024
32 checks passed
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants