| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Bumps the bundled zccache floor to >=1.12.7 to pick up zackees/zccache#763, which version-namespaces the cache root and closes the version-shadow chain at zackees/zccache#762.
Practically: side-by-side installs (e.g. PyPI + bundled fbuild copies) no longer trample each other's daemon state, fixing the silent mid-build daemon death reported in zackees/zccache#759 and the 1.12.6 self-hash regression in zackees/zccache#760.
No FastLED source code changes — Arduino API and runtime behaviour are identical to 3.10.3.
For a compile environment please see https://github.com/fastled/platformio-starter
Full Changelog: 3.9.20...3.10.0
Optional upgrade. Fixes fadeByLight not being in the global namespace. This fixes a regression that happened in 3.9.17.
Full Changelog: 3.9.19...3.9.20
For more information see this bug fix thread.
It turns out the older AVR gcc compilers will not eliminate complex static objects that are not referenced. However it seems it will eliminate them if they are in statics inside static functions, like this:
This will unconditionally initialize in avr-gcc at startup, but be removed in more modern toolchains.
typedef fl::hash_map<Key, Value> HashMap; static HashMap gStatic;
This however, will be removed in avr-gcc and others
static HashMap& get_static() {
static HashMap s_static;
return s_static;
}
Here is a Chat GPT Summary:
AVR-GCC does not aggressively eliminate unused static non-POD objects — even if they appear to be unused — because:
Modern Clang and GCC (non-AVR) will remove these if they are not referenced and the constructors are not marked in a way that ensures their side effects are preserved.
In the Arduino build system (typically using avr-gcc):
In more aggressive modern toolchains (Clang/GCC with LTO):
struct AutoRun {
AutoRun() { Serial.println("I ran!"); }
};
static AutoRun my_auto_run; // Kept by AVR-GCC, likely dropped by Clang w/LTOTo preserve it in Clang:
__attribute__((used)) static AutoRun my_auto_run;This is an AVR-GCC behavior, not strictly Arduino's doing — but Arduino's default settings do reinforce this behavior by avoiding LTO and preserving .ctors invocations. Modern toolchains need extra care to keep static initializers with side effects.
This release has a few bug fixes in it and some internal refactorings that has been on my to-do list for a while. The next release will have more features and less core changes.
FastLED now has a small subset of std:: data structures. This allows complex code ingest from open source which rely on things like std::vector<>, hashmaps and others. Unlike other micro stdlib attempts, this one actually compiles everywhere thanks to our ~50 testing configurations that we run on each change committed to the repo.
These std data structures were used to create complex rendering functions xypaths that look absolutely jaw dropping.
However in this release my attention got pulled into about four different directions. Audio and xypaths were added to the core, but the examples were prunned for this release, in order to get this release out in a timely manner.
What's all the noise about lines and rasterization in this release?
You ever try to draw a point or a line on a LED matrix? By default it looks awful. As the point particle moves it lights up one led index at a time. It's tricky to make this transition look smooth. Drawing beautiful lines on matrices requires pixel-neighboring calculations in order to correctly blend into a low resolution strip/matrix. And that's what most of the new math you see below is about.. Take a point in float(x,y) and then color a tile of 2x2 pixels, or 2x1 if you are in a strip.
Happy coding!
This release is for the artists and makers who want to make the light they want to see in the world.
fastled_3_16_small.mp4FastLED 3.9.16 is now released. Arduino will approve it in the next few hours and should have it available through your IDE by Friday morning.
This release of FastLED is geared toward our programmer-artist community. If you love creating amazing visuals then this release will be one of the most significant releases yet for you. Read on:
FxWave: FastLED now features a 1D and 2D wave simulator. Special thanks to Shawn Silverman who provided the differential equations to make this work. This simulator runs in int16_t fixed integer space, allowing it to be fast on MCU's without a dedicated FP processor. We support super scaling the wave simulator which is then down scaled for rendering. The wave simulator will default to half-duplex which means negative values are discarded. This allows the simulator in it's default state to produce black, instead of some midpoint (127) color. The fixed 16 point integer calculation has enough bit depth to run easing functions mapping [0, 1] -> [0, 1] without loss of quality. Unlike particle based effects which slow down as the complexity increases, the WaveSimulator does not suffer from this. The same processing is needed whether the wave simulator is drawing all black or otherwise, so go wild.
Animations: TimeAlpha classes now offer smooth transitions based on the current time and begin & end times. You will trigger the TimeAlpha which will start the clock. After this, you can called the TimeAlpha's update() function to retrieve the current alpha value. You can use this alpha transition to do path tracing. For example in the video above I'm drawing a cross by running a pixel trace with a span of 6. Any intersection with the wave simulator is then incremented by the specified value. Example usages include: one TimeAlpha class can be used for brightness control while another can be used as input for a parametric path, taking in a uint8_t or float and outputting x and y.
Alpha-less blending: CRGB::blendAlphaMaxChannel(...) allows per-pixel blending between most visualizers now in the wild. FastLED does not have a strong concept of alpha masks. This really bothered me as compositing is the key for great visualizers and this algorithm produces striking results and can essentially be bolted on without much changes: the brightness of a pixel is a strong signal for proper mixing. You will specify an upper and lower pixel. The upper pixel is queried for the max brightness of it's components. This max brightness then becomes the alpha mask and the two pixels are mixed to generate a new pixel.
fx/fx2d/blend.h is a new Fx2d subclass that functions as a blend stack. combining several Fx2d classes into one functional Fx2d instance. Each Fx2d contained in the blending stack can have it's own blur settings specified. The layers are then composited from back to front. The bottom layer is drawn directly without blending. The rest of the channels are composited via CRGB::blendAlphaMaxChannel(...). The bluring parameters for the blend stack can be set for the whole stack, or per frame, allowing striking visual quality even at low resolution and eliminates a lot of aliasing effects common in FastLED visualizers.
inoise(...) just went 4D. This is designed to support irregular shapes like led strip wrapped cylinders, which is the main use case. In this instance you could define a width and radius and then compute each pixel in 3D space. You can then run the x,y,z coordinates through inoise(...) plus a time factor to produce a noise pattern.
FireMatrix and FireCylinder. Fire2012 visualizer is becoming more dated by the day. There are lot of 2D fire simulators in the wild based on FastLED's perlin noise functions. The FireMatrix is a straight matrix for flat pannels, while FireCylinder wrapps around so that the first and last x value are seemless. FireCylinder is perfect for those flex led panels if you want to bend them on themselves - you will now get a full 360 fire effect.
That's it at a high level. If you aren't interested in the details of this release you can stop reading now.
Happy coding! ~Zach
Full Changelog: 3.9.15...3.9.16
| Back | FazBrowse Home | New Git URL |