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

Custom LED implementation #166

Merged
merged 10 commits into from
May 6, 2023

Conversation

FeralAI
Copy link
Contributor

@FeralAI FeralAI commented Apr 22, 2023

This is the firmware implementation for #107.

This PR requires OpenStickCommunity/WebConfigurator#38 for the UI updates.

A new animation mode for Custom Theme has been added. If enabled, this mode will use the new CustomTheme and CustomThemePressed animation subclasses and configured LED options to display a customized static theme with customized button color presses, as the issues requested.

In the process of debugging I reworked how the pressed animation is created since it was only created as a fallback instead of when needed like the base animations.

If we want to do any customized themes with animations that will require a larger refactor or migration of the LED controller library.

@arntsonl arntsonl requested a review from deeebug April 26, 2023 14:31
@FeralAI
Copy link
Contributor Author

FeralAI commented May 6, 2023

This should be functionally ready now. Summary of changes not directly related to this feature:

  • Fixed excessive memory use in webconfig.cpp when deserializing POST data
  • Bumped stack size up to 4kb with add_compile_definitions(PICO_STACK_SIZE=0x1000) in CMakeLists.txt
  • Updated ArduinoJson library to v6.21.2
  • Fixed issue where user couldn't use the Previous Animation shortcut to cycle around the animation list (needed explicit cast to check for negative)
  • Pressed animations are now properly created and destroyed like normal animations
  • Pressed animations should flicker much less when changing animations

I'll add documentation for this feature over the weekend.

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.

Super cool!! With fluppi's changes, we'll have better stack space and fully independent LED configurations!

@arntsonl arntsonl merged commit 0a150dd into OpenStickCommunity:main May 6, 2023
4 checks passed
@FeralAI FeralAI deleted the features/custom-led branch May 6, 2023 18:27
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.

None yet

2 participants