some effect optimizations
* getpixelcolor: attribute pure - it reads memory, but does not write * some optimizations for SEGMENT.blur() and SEGMENT.fadeToBlackBy() * FX.c:pp remove double calls to blur() and fade_out() * FX.cpp: SEGMENT.setUpLeds() added to effects, to enable LED buffering (safe some time because getPixelColor does not need to access NeopixelBus) * a few other optimizations to safe time and avoid "expensive" operations * set I2C bus speed to 400kHz (default is 100Khz) * a few other small optimizations and tweaks * pio: esp32 V4 builds use "patch5" toolchain version, which contains a few bugfixes especially for memory management.
This commit is contained in:
@@ -420,7 +420,9 @@ BusNetwork::BusNetwork(BusConfig &bc) : Bus(bc.type, bc.start, bc.autoWhite) {
|
||||
void BusNetwork::setPixelColor(uint16_t pix, uint32_t c) {
|
||||
if (!_valid || pix >= _len) return;
|
||||
if (hasWhite()) c = autoWhiteCalc(c);
|
||||
#if !defined(WLEDMM_FASTPATH) // WLEDMM expensive operation
|
||||
if (_cct >= 1900) c = colorBalanceFromKelvin(_cct, c); //color correction from CCT
|
||||
#endif
|
||||
uint16_t offset = pix * _UDPchannels;
|
||||
_data[offset] = R(c);
|
||||
_data[offset+1] = G(c);
|
||||
|
||||
Reference in New Issue
Block a user