Skip to content

Conversation

@blazoncek
Copy link
Contributor

@blazoncek blazoncek commented Mar 26, 2025

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.

blazoncek and others added 30 commits December 8, 2024 12:50
- added time for debug
- moved initEthernet() into network.cpp
- renamed initInterfaces() to connected()
- fixed Network.isConnected()
- added 2min delay when searching channels (wrap)
- force hidden AP even when temporary
- 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
blazoncek added 23 commits April 3, 2025 09:52
- (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
}
}

void fast_color_add(uint32_t &c1, uint32_t c2, uint8_t scale) {
Copy link
Collaborator

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.

@blazoncek
Copy link
Contributor Author

Closing as I managed to port most of it into 0.16.

@blazoncek blazoncek closed this Apr 23, 2025
@blazoncek blazoncek deleted the particle branch October 26, 2025 17:51
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.