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:
@@ -844,6 +844,35 @@ void WLED::initInterfaces()
|
||||
}
|
||||
#endif
|
||||
|
||||
//WLEDMM: add netdebug variables
|
||||
#ifdef WLED_DEBUG_HOST
|
||||
if (netDebugPrintIP[0] == 0) {
|
||||
//WLEDMM: this code moved from net_debug.cpp as we store IP as IPAddress type
|
||||
if (!netDebugPrintIP && !netDebugPrintIP.fromString(WLED_DEBUG_HOST)) {
|
||||
#ifdef ESP8266
|
||||
WiFi.hostByName(WLED_DEBUG_HOST, netDebugPrintIP, 750);
|
||||
#else
|
||||
#ifdef WLED_USE_ETHERNET
|
||||
ETH.hostByName(WLED_DEBUG_HOST, netDebugPrintIP);
|
||||
#else
|
||||
WiFi.hostByName(WLED_DEBUG_HOST, netDebugPrintIP);
|
||||
#endif
|
||||
#endif
|
||||
} else {
|
||||
IPAddress ipAddress = Network.localIP();
|
||||
netDebugPrintIP[0] = ipAddress[0];
|
||||
netDebugPrintIP[1] = ipAddress[1];
|
||||
netDebugPrintIP[2] = ipAddress[2];
|
||||
}
|
||||
}
|
||||
if (netDebugPrintPort == 0)
|
||||
#ifdef WLED_DEBUG_PORT
|
||||
netDebugPrintPort = WLED_DEBUG_PORT;
|
||||
#else
|
||||
netDebugPrintPort = 7868; //Default value
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef WLED_DISABLE_ALEXA
|
||||
// init Alexa hue emulation
|
||||
if (alexaEnabled)
|
||||
|
||||
Reference in New Issue
Block a user