-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Particle system and segment/effect blending #4612
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
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- credit @DedeHai - prevents flickering on C3 when accessing FS
- credit @DedeHai - prevents flickering on C3 when accessing FS
The Unit of Measurement ("tempScale") of the MQTT message is set for each published measurement - but not for the homeassistant discovery.
Thus, openhab (and mabye other systems?) don't recognize the value as "Number" - so it uses String instead. This is somehow annoying when trying to configure the sensor channel to be linked to an existing item in OpenHAB.
(Items that are created automatically or with "Add point to model" can be configured in a way that the String is transformed to Number or Number:Temperature, but existing Items cannot be linked).
When a "Unit of Measurement" is set in HomeAssistant discovery, the HA binding of OpenHAB notices that the MQTT String is a number and automatically converts it.
- credit @DedeHai - prevents flickering on C3 when accessing FS
Also fixed: - 2D config apply on /json/cfg - conversion MAC to string and string to MAC - preset debug message
- for Arc expansion - or gaps - or ledmaps with missing pixels
- for Arc expansion - or gaps - or ledmaps with missing pixels
- for Arc expansion - or gaps - or ledmaps with missing pixels
- 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
…uction from panels
- (re)moved gamma to the last step in LED output - reconstructed all cpt-city palettes to be uncorrected - added Python script to download and convert cpt-city palettes - misc: removed panels counter - FX: added palette option to Flow Stripe and Drift Rose
- made a few methods protected - added safeguards for segment changing - increased vertical 2D dimensions to 16 bit
- undo strip.trigger() change
- reduce 'useMainSegmentOnly' checks - add clarification - use strip.trigger() in useMainSegmentOlny
- reordered class members for better alignment - moved transition progress into Transition class - made more functions protected - improved transition handling - tweaks in segment blending
- removed all memory management - entire PS data stored in SEGMENT.data - reorganised PS structures - implemented a few missing features - fixed/static 2D particles - fraction of particles used - reversed gravity for 2D - moved fast color functions to color.cpp (updated to use uint32_t) - removed all buffering (except for advanced size control) - fixed a few bugs (uninitialised properties, out-of-bounds access) - introduced Segment pointer to PS object
- direct pixels access in PS
DedeHai
reviewed
Apr 13, 2025
wled00/colors.cpp
Outdated
| } | ||
| } | ||
|
|
||
| void fast_color_add(uint32_t &c1, uint32_t c2, uint8_t scale) { |
Collaborator
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.
this version kind of defeats its own purpose. yes its a bit faster but I suspect not by much.
the key points why my version is fast:
- uses multiply add (or at least the compiler should do so)
- uses CRGBW with direct access instead of all the shifts
- ignores white channel
- does not use max()
if we want to move this into colors.cpp: call it "fast_RGB_add()" and use my optimized version.
Contributor
Author
|
Closing as I managed to port most of it into 0.16. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Draft PR for @DedeHai to start working on integration of particle system into unified segment and effect blending using layering technique.
Based on 0.15 code.