mirror of
https://github.com/wled/WLED.git
synced 2025-07-19 00:36:36 +00:00
Nesting bug fix.
This commit is contained in:
parent
d049e0a149
commit
a2105de402
@ -309,15 +309,17 @@ void getSettingsJS(byte subPage, char* dest)
|
|||||||
char nS[8];
|
char nS[8];
|
||||||
|
|
||||||
// add reserved and usermod pins as d.um_p array
|
// add reserved and usermod pins as d.um_p array
|
||||||
|
oappend(SET_F("d.um_p=[6,7,8,9,10,11"));
|
||||||
|
|
||||||
DynamicJsonDocument doc(JSON_BUFFER_SIZE/2);
|
DynamicJsonDocument doc(JSON_BUFFER_SIZE/2);
|
||||||
JsonObject mods = doc.createNestedObject(F("um"));
|
JsonObject mods = doc.createNestedObject(F("um"));
|
||||||
usermods.addToConfig(mods);
|
usermods.addToConfig(mods);
|
||||||
oappend(SET_F("d.um_p=[6,7,8,9,10,11"));
|
if (!mods.isNull()) fillUMPins(mods);
|
||||||
if (!mods.isNull()) {
|
|
||||||
fillUMPins(mods);
|
|
||||||
#ifdef WLED_ENABLE_DMX
|
#ifdef WLED_ENABLE_DMX
|
||||||
oappend(SET_F(",2")); // DMX hardcoded pin
|
oappend(SET_F(",2")); // DMX hardcoded pin
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WLED_ENABLE_ADALIGHT
|
#ifdef WLED_ENABLE_ADALIGHT
|
||||||
// inform settings page that pin 3 is used by ADALights if not aleready used by strip (previous setup)
|
// inform settings page that pin 3 is used by ADALights if not aleready used by strip (previous setup)
|
||||||
// NOTE: this will prohibit pin 3 use on new installs
|
// NOTE: this will prohibit pin 3 use on new installs
|
||||||
@ -338,12 +340,15 @@ void getSettingsJS(byte subPage, char* dest)
|
|||||||
if (!pin3used && pinManager.isPinAllocated(3)) oappend(SET_F(",3")); // ADALight (RX) pin
|
if (!pin3used && pinManager.isPinAllocated(3)) oappend(SET_F(",3")); // ADALight (RX) pin
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WLED_DEBUG
|
#ifdef WLED_DEBUG
|
||||||
oappend(SET_F(",1")); // debug output (TX) pin
|
oappend(SET_F(",1")); // debug output (TX) pin
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(ARDUINO_ARCH_ESP32) && defined(WLED_USE_PSRAM)
|
#if defined(ARDUINO_ARCH_ESP32) && defined(WLED_USE_PSRAM)
|
||||||
if (psramFound()) oappend(SET_F(",16,17")); // GPIO16 & GPIO17 reserved for SPI RAM
|
if (psramFound()) oappend(SET_F(",16,17")); // GPIO16 & GPIO17 reserved for SPI RAM
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WLED_USE_ETHERNET
|
#ifdef WLED_USE_ETHERNET
|
||||||
if (ethernetType != WLED_ETH_NONE && ethernetType < WLED_NUM_ETH_TYPES) {
|
if (ethernetType != WLED_ETH_NONE && ethernetType < WLED_NUM_ETH_TYPES) {
|
||||||
for (uint8_t p=0; p<WLED_ETH_RSVD_PINS_COUNT; p++) { oappend(","); oappend(itoa(esp32_nonconfigurable_ethernet_pins[p].pin,nS,10)); }
|
for (uint8_t p=0; p<WLED_ETH_RSVD_PINS_COUNT; p++) { oappend(","); oappend(itoa(esp32_nonconfigurable_ethernet_pins[p].pin,nS,10)); }
|
||||||
@ -364,7 +369,7 @@ void getSettingsJS(byte subPage, char* dest)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
|
||||||
oappend(SET_F("];"));
|
oappend(SET_F("];"));
|
||||||
|
|
||||||
// set limits
|
// set limits
|
||||||
|
Loading…
x
Reference in New Issue
Block a user