NetDebug: switch between serial/netdebug, store ip and port in settings
pio.ini: enable WLED_DEBUG_HOST in esp32_4MB_M_debug and esp32_16MB_M_debug audio_reactive, um6050, wled.h - replace DEBUGOUT.print(x) by DEBUGOUT(x) etc wled.h: switch between serial/netdebug cfg.cpp, set.cpp, wled.cpp, xml.cpp - store netDebugPrintIP and netDebugPrintPort in cfg.json index.js: rename info tab on off to Net Debug settings.sync: add netdebug net_debug.h/cpp: use global netDebugPrintIP remove debugPrintHostIP
This commit is contained in:
@@ -472,6 +472,15 @@ bool deserializeConfig(JsonObject doc, bool fromFS) {
|
||||
CJSON(hueIP[i], if_hue_ip[i]);
|
||||
#endif
|
||||
|
||||
//WLEDMM: add netdebug variables
|
||||
#ifdef WLED_DEBUG_HOST
|
||||
JsonObject if_ndb = interfaces["ndb"];
|
||||
JsonArray if_ndb_ip = if_ndb["ip"];
|
||||
for (byte i = 0; i < 4; i++)
|
||||
CJSON(netDebugPrintIP[i], if_ndb_ip[i]);
|
||||
CJSON(netDebugPrintPort, if_ndb["port"]);
|
||||
#endif
|
||||
|
||||
JsonObject if_ntp = interfaces[F("ntp")];
|
||||
CJSON(ntpEnabled, if_ntp["en"]);
|
||||
getStringFromJson(ntpServerName, if_ntp[F("host")], 33); // "1.wled.pool.ntp.org"
|
||||
@@ -930,6 +939,16 @@ void serializeConfig() {
|
||||
}
|
||||
#endif
|
||||
|
||||
//WLEDMM: add netdebug variables
|
||||
#ifdef WLED_DEBUG_HOST
|
||||
JsonObject if_ndb = interfaces.createNestedObject("ndb");
|
||||
JsonArray if_ndb_ip = if_ndb.createNestedArray("ip");
|
||||
for (byte i = 0; i < 4; i++) {
|
||||
if_ndb_ip.add(netDebugPrintIP[i]);
|
||||
}
|
||||
if_ndb["port"] = netDebugPrintPort;
|
||||
#endif
|
||||
|
||||
JsonObject if_ntp = interfaces.createNestedObject("ntp");
|
||||
if_ntp["en"] = ntpEnabled;
|
||||
if_ntp[F("host")] = ntpServerName;
|
||||
|
||||
Reference in New Issue
Block a user