leds(rgb): also adjusted if new ledmap + grow not shrink (unless...)

FX.h: add ledsrgbSize and allocLeds()
FX_fcn.cpp: 
- copy constructor: allocLeds()
- move constructor: no change
- copy assignment: reuse! + allocLeds()
- move asignment: no change
- resetIfRequired: no free
- setUpLeds/resetSegments: allocLeds()

unless...: copy constructor aften called. That is the bad boy causing re-allocs at every effect change!
This commit is contained in:
Ewoud
2023-05-24 14:59:39 +02:00
parent b195596ad7
commit 305a5b19c4
4 changed files with 44 additions and 22 deletions

View File

@@ -415,7 +415,7 @@ void getSettingsJS(AsyncWebServerRequest* request, byte subPage, char* dest) //W
char rf[4] = "RF"; rf[2] = 48+s; rf[3] = 0; //off refresh
char aw[4] = "AW"; aw[2] = 48+s; aw[3] = 0; //auto white mode
char wo[4] = "WO"; wo[2] = 48+s; wo[3] = 0; //swap channels
char sp[4] = "SP"; sp[2] = 48+s; sp[3] = 0; //bus clock speed
// char sp[4] = "SP"; sp[2] = 48+s; sp[3] = 0; //bus clock speed WLEDMM to do bus
oappend(SET_F("addLEDs(1);"));
uint8_t pins[5];
uint8_t nPins = bus->getPins(pins);