zero crossing counter is often larger than in the prototype by @troyhacks - due to calculation after filtering (catches more crossings), and due to the fixed condition for detecting zero crossings (doubles the number of crossings).
This patch reduces the final value to 2/3, so it typically stays below 256.
Troy's zeroCrossingCount - counts zero crossings inside audioreactive, and makes the number availeable to other usermods and effects.
This PR is a prerequisite for PR #124 (auto playlist)
* calculate zero crossings after filtering out DC offsets
* update effect variable only once
* fix a logic error when detecting zero crossings
* fix array bounds violation when creating umdata entries
Trying to solve CI build errors
Tool Manager: Installing platformio/tool-scons @ ~4.40400.0
Error: Could not find the package with 'platformio/tool-scons @ ~4.40400.0' requirements for your system 'linux_x86_64'
If the segment is wider than 20 pixels, we optimize calculations due to symmetry - for smaller arcs the result looks better without optimization.
As a side-effect, we have enough computing power left to go through the complete circumference, avoiding holes.
as it turns out, the "_t" functions (from wled_math.cpp) are about 3 times (!!!) slower than the standard functions.
* mapping modes : Arc and Circle
* effects: 2D Drift, 2D Drift Rose
* use "float" math only - sinf(), cosf(), roundf()
* use fewer "rays" for medium-sized matrix (<=32 pixels wide/high)
* ray drawing optimized to use fixed point
up to 80% faster on esp32 and esp32-S3; -S2/-C3 should also see benefits, as these do not have floating point support in hardware.