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

Replaced single palette cases with an array to consolidate code #4270

Open
wants to merge 1 commit into
base: 0_15
Choose a base branch
from

Conversation

DedeHai
Copy link
Collaborator

@DedeHai DedeHai commented Nov 10, 2024

  • all palettes are now defined in palettes.h
  • access to fastled palettes as an array to remove the switch cases
  • palette creation in json.cpp in a loop instead of repeated calls to save some flash (about 300 bytes)

- all palettes are defined in palettes.h
- access to fastled palettes as an array to remove the switch cases
- palette createn in json.cpp in a loop instead of repeaded calls to save flash
Copy link
Collaborator

@blazoncek blazoncek left a comment

Choose a reason for hiding this comment

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

It might also be beneficial to completely remove FastLED dependency and include/duplicate its palettes in WLED.
IMO FastLED is loosing foothold in WLED (if you will implement your other FastLED replacements).

@DedeHai
Copy link
Collaborator Author

DedeHai commented Nov 15, 2024

there are a few other functions used from fastled: CRGB and 8-bit math functions for example. I am not sure there is much benefit from copying all those functions instead of using the library but I may take a closer look once all the PRs are merged.

@blazoncek
Copy link
Collaborator

qadd8(), sin8/sin16(), random8/random16() I think you touched all of them at some point.
Other that are used are overloaded operators (i.e. + etc) which operate on struct CRGB (which you also touched).

I am not saying that it is necessary to replace the library, I am just thinking out loud about possibility to replace library since you already ventured into those waters by replacing some of the functionality of FastLED.

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.

3 participants