@@ -257,7 +257,7 @@ void getSettingsJS(byte subPage, char* dest)
257257 char nS[3 ];
258258
259259 // add usermod pins as d.um_p array (TODO: usermod config shouldn't use state. instead we should load "um" object from cfg.json)
260- DynamicJsonDocument doc (JSON_BUFFER_SIZE);
260+ /* DynamicJsonDocument doc(JSON_BUFFER_SIZE);
261261 JsonObject mods = doc.createNestedObject(F("mods"));
262262 usermods.addToJsonState(mods);
263263 if (!mods.isNull()) {
@@ -270,7 +270,7 @@ void getSettingsJS(byte subPage, char* dest)
270270 }
271271 }
272272 oappend(SET_F("];"));
273- }
273+ }*/
274274
275275 #if defined(WLED_MAX_BUSSES) && WLED_MAX_BUSSES>1
276276 oappend (SET_F (" addLEDs(" ));
@@ -291,7 +291,6 @@ void getSettingsJS(byte subPage, char* dest)
291291 for (uint8_t s=0 ; s < busses.getNumBusses (); s++){
292292 Bus* bus = busses.getBus (s);
293293 char lp[4 ] = " L0" ; lp[2 ] = 48 +s; lp[3 ] = 0 ; // ascii 0-9 //strip data pin
294- char lk[4 ] = " L1" ; lk[2 ] = 48 +s; lk[3 ] = 0 ; // strip clock pin. 255 for none
295294 char lc[4 ] = " LC" ; lc[2 ] = 48 +s; lc[3 ] = 0 ; // strip length
296295 char co[4 ] = " CO" ; co[2 ] = 48 +s; co[3 ] = 0 ; // strip color order
297296 char lt[4 ] = " LT" ; lt[2 ] = 48 +s; lt[3 ] = 0 ; // strip type
@@ -300,8 +299,10 @@ void getSettingsJS(byte subPage, char* dest)
300299 oappend (SET_F (" addLEDs(1);" ));
301300 uint8_t pins[5 ];
302301 uint8_t nPins = bus->getPins (pins);
303- sappend (' v' , lp, pins[0 ]);
304- if (pinManager.isPinOk (pins[1 ])) sappend (' v' , lk, pins[1 ]);
302+ for (uint8_t i = 0 ; i < nPins; i++) {
303+ lp[1 ] = 48 +i;
304+ if (pinManager.isPinOk (pins[i])) sappend (' v' , lp, pins[i]);
305+ }
305306 sappend (' v' , lc, bus->getLength ());
306307 sappend (' v' ,lt,bus->getType ());
307308 sappend (' v' ,co,bus->getColorOrder ());
0 commit comments